mirror of
https://github.com/git/git
synced 2024-09-12 21:04:12 +00:00
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>
This commit is contained in:
parent
f359ae42ac
commit
2d76d0d151
|
@ -217,10 +217,9 @@ int main(int argc, char **argv)
|
||||||
if (!strcmp(name, "undefined"))
|
if (!strcmp(name, "undefined"))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
fwrite(p_start, p - p_start, 1, stdout);
|
fwrite(p_start, p - p_start + 1, 1,
|
||||||
fputc('(', stdout);
|
stdout);
|
||||||
fputs(name, stdout);
|
printf(" (%s)", name);
|
||||||
fputc(')', stdout);
|
|
||||||
p_start = p + 1;
|
p_start = p + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue