]> asedeno.scripts.mit.edu Git - git.git/blobdiff - commit.h
Merge branch 'ds/checkout-upper'
[git.git] / commit.h
index 4ed0c1cf7f5fdf235a2668d60e8250745e723b7d..aa679867a9376496febd5105121b1f49f3ff96a4 100644 (file)
--- a/commit.h
+++ b/commit.h
@@ -117,4 +117,9 @@ extern int interactive_add(void);
 extern void add_files_to_cache(int verbose, const char *prefix, const char **files);
 extern int rerere(void);
 
+static inline int single_parent(struct commit *commit)
+{
+       return commit->parents && !commit->parents->next;
+}
+
 #endif /* COMMIT_H */