summaryrefslogtreecommitdiff
path: root/builtin/log.c
diff options
context:
space:
mode:
authorLibravatar Nguyễn Thái Ngọc Duy <pclouds@gmail.com>2014-11-30 16:05:00 +0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2014-12-01 11:32:29 -0800
commit6a0b0b6de996e2ac7eeb951e3d08f577c11c7e54 (patch)
treeb5ce77337d93903b5363e20694397efcb73daf25 /builtin/log.c
parentGit 2.2 (diff)
downloadtgif-6a0b0b6de996e2ac7eeb951e3d08f577c11c7e54.tar.xz
tree.c: update read_tree_recursive callback to pass strbuf as base
This allows the callback to use 'base' as a temporary buffer to quickly assemble full path "without" extra allocation. The callback has to restore it afterwards of course. Helped-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/log.c')
-rw-r--r--builtin/log.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/log.c b/builtin/log.c
index 734aab3a73..f2a9f0156d 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -489,7 +489,7 @@ static int show_tag_object(const unsigned char *sha1, struct rev_info *rev)
}
static int show_tree_object(const unsigned char *sha1,
- const char *base, int baselen,
+ struct strbuf *base,
const char *pathname, unsigned mode, int stage, void *context)
{
printf("%s%s\n", pathname, S_ISDIR(mode) ? "/" : "");