Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-11-26 10:36:58 +0300
committerJunio C Hamano <junkio@cox.net>2005-11-26 10:36:58 +0300
commit2d76d0d151239538c43b61572283405b10df43ac (patch)
tree9ccf8849fa9b522a344645c2f28f12ab036e30d5 /name-rev.c
parentf359ae42ac102ef98d5708f1dc8b06e6af2701c1 (diff)
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>
Diffstat (limited to 'name-rev.c')
-rw-r--r--name-rev.c7
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;
}
}