Ignore more generated files
[git.git] / commit.h
index 491b2c1..30702ca 100644 (file)
--- a/commit.h
+++ b/commit.h
@@ -17,10 +17,13 @@ struct commit {
        char *buffer;
 };
 
+extern int save_commit_buffer;
 extern const char *commit_type;
 
 struct commit *lookup_commit(const unsigned char *sha1);
 struct commit *lookup_commit_reference(const unsigned char *sha1);
+struct commit *lookup_commit_reference_gently(const unsigned char *sha1,
+                                             int quiet);
 
 int parse_commit_buffer(struct commit *item, void *buffer, unsigned long size);
 
@@ -40,6 +43,7 @@ enum cmit_fmt {
        CMIT_FMT_DEFAULT = CMIT_FMT_MEDIUM,
        CMIT_FMT_SHORT,
        CMIT_FMT_FULL,
+       CMIT_FMT_ONELINE,
 };
 
 extern enum cmit_fmt get_commit_format(const char *arg);
@@ -54,4 +58,17 @@ struct commit *pop_most_recent_commit(struct commit_list **list,
 struct commit *pop_commit(struct commit_list **stack);
 
 int count_parents(struct commit * commit);
+
+/*
+ * Performs an in-place topological sort of list supplied.
+ *
+ * Pre-conditions:
+ *   all commits in input list and all parents of those
+ *   commits must have object.util == NULL
+ *        
+ * Post-conditions: 
+ *   invariant of resulting list is:
+ *      a reachable from b => ord(b) < ord(a)
+ */
+void sort_in_topological_order(struct commit_list ** list);
 #endif /* COMMIT_H */