diff options
author | Jeff King <peff@peff.net> | 2012-11-09 12:51:06 -0500 |
---|---|---|
committer | Jeff King <peff@peff.net> | 2012-11-09 12:51:06 -0500 |
commit | 19fb61369583410a4f79dbc065b4dc8125236c0b (patch) | |
tree | 7f7498d204f8df97ddc0cd6726154a0ce5fa5bb7 /commit.c | |
parent | 9d91c0e3d5d1bf9339a31ecbd5f6defdac8540d0 (diff) | |
parent | 745f7a8cacae55df3e00507344d8db2a31eb57e8 (diff) | |
download | git-19fb61369583410a4f79dbc065b4dc8125236c0b.tar.gz git-19fb61369583410a4f79dbc065b4dc8125236c0b.tar.xz |
Merge branch 'nd/builtin-to-libgit'
Code cleanups so that libgit.a does not depend on anything in the
builtin/ directory.
* nd/builtin-to-libgit:
fetch-pack: move core code to libgit.a
fetch-pack: remove global (static) configuration variable "args"
send-pack: move core code to libgit.a
Move setup_diff_pager to libgit.a
Move print_commit_list to libgit.a
Move estimate_bisect_steps to libgit.a
Move try_merge_command and checkout_fast_forward to libgit.a
Diffstat (limited to 'commit.c')
-rw-r--r-- | commit.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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)); + } +} |