summaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-07-08 10:09:28 -0700
committerJunio C Hamano <gitster@pobox.com>2016-07-08 10:11:36 -0700
commit54307ea7c3ced760ee375483a786ec7180798aed (patch)
tree989d4ee64a7abae2833d07a3ab4eccc127eded92 /commit.c
parentdabd35f4cdd8bcfa502d082da5a3e4b927a2b329 (diff)
downloadgit-54307ea7c3ced760ee375483a786ec7180798aed.tar.gz
commit.c: remove print_commit_list()jk/printf-format
The helper function tries to offer a way to conveniently show the last one differently from others, presumably to allow you to say something like A, B, and C. while iterating over a list that has these three elements. However, there is only one caller, and it passes the same format string "%s\n" for both the last one and the other ones. Retire the helper function and update the caller with a simplified version. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.c')
-rw-r--r--commit.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/commit.c b/commit.c
index 3f4f371e5e..bf27972533 100644
--- a/commit.c
+++ b/commit.c
@@ -1617,16 +1617,6 @@ struct commit_list **commit_list_append(struct commit *commit,
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, oid_to_hex(&list->item->object.oid));
- }
-}
-
const char *find_commit_header(const char *msg, const char *key, size_t *out_len)
{
int key_len = strlen(key);