OSDN Git Service

Merge branch 'ob/imap-send-ssl-verify' into maint
[git-core/git.git] / commit.c
index 213bc98..e8eb0ae 100644 (file)
--- a/commit.c
+++ b/commit.c
@@ -1347,3 +1347,13 @@ struct commit_list **commit_list_append(struct commit *commit,
        new->next = NULL;
        return &new->next;
 }
+
+void print_commit_list(struct commit_list *list,
+                      const char *format_cur,
+                      const char *format_last)
+{
+       for ( ; list; list = list->next) {
+               const char *format = list->next ? format_cur : format_last;
+               printf(format, sha1_to_hex(list->item->object.sha1));
+       }
+}