summaryrefslogtreecommitdiff
path: root/builtin/rev-list.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2012-10-26 15:53:51 (GMT)
committerJeff King <peff@peff.net>2012-10-29 07:08:30 (GMT)
commitefc7df454e9ec8b730fb2293c8549cec43de6bfa (patch)
treebc96070114a2ca5820523944880f635910155d46 /builtin/rev-list.c
parentc43cb38612192fa45bf7ed981a98bc4ddb86ce75 (diff)
downloadgit-efc7df454e9ec8b730fb2293c8549cec43de6bfa.zip
git-efc7df454e9ec8b730fb2293c8549cec43de6bfa.tar.gz
git-efc7df454e9ec8b730fb2293c8549cec43de6bfa.tar.bz2
Move print_commit_list to libgit.a
This is used by bisect.c, part of libgit.a while it stays in builtin/rev-list.c. Move it to commit.c so that we won't get undefined reference if a program that uses libgit.a happens to pull it in. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Jeff King <peff@peff.net>
Diffstat (limited to 'builtin/rev-list.c')
-rw-r--r--builtin/rev-list.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/builtin/rev-list.c b/builtin/rev-list.c
index a0ec84e..67701be 100644
--- a/builtin/rev-list.c
+++ b/builtin/rev-list.c
@@ -201,16 +201,6 @@ static void show_edge(struct commit *commit)
printf("-%s\n", sha1_to_hex(commit->object.sha1));
}
-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));
- }
-}
-
static void print_var_str(const char *var, const char *val)
{
printf("%s='%s'\n", var, val);