diff options
author | Junio C Hamano <junkio@cox.net> | 2005-11-25 23:36:58 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2005-11-25 23:36:58 -0800 |
commit | 2d76d0d151239538c43b61572283405b10df43ac (patch) | |
tree | 9ccf8849fa9b522a344645c2f28f12ab036e30d5 | |
parent | git-mv is not able to handle big directories (diff) | |
download | tgif-2d76d0d151239538c43b61572283405b10df43ac.tar.xz |
name-rev: fix off-by-one error in --stdin.
It dropped the last hexdigit in the object name.
[jc: Noticed and patch supplied by ALASCM, reworked to apply at
the right place by me]
Signed-off-by: Junio C Hamano <junkio@cox.net>
-rw-r--r-- | name-rev.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/name-rev.c b/name-rev.c index 817e36b793..7d89401a41 100644 --- a/name-rev.c +++ b/name-rev.c @@ -217,10 +217,9 @@ int main(int argc, char **argv) if (!strcmp(name, "undefined")) continue; - fwrite(p_start, p - p_start, 1, stdout); - fputc('(', stdout); - fputs(name, stdout); - fputc(')', stdout); + fwrite(p_start, p - p_start + 1, 1, + stdout); + printf(" (%s)", name); p_start = p + 1; } } |