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:
authorShawn O. Pearce <spearce@spearce.org>2007-09-14 11:31:09 +0400
committerJunio C Hamano <gitster@pobox.com>2007-09-19 14:22:30 +0400
commit4ad1eada9774a1f340beb4fdf78f1735534741bb (patch)
tree4c127876dfe47f683c951d6786d10355badf4770 /builtin-fetch.c
parent1aad91f5a715af92892aea7764beb829938ab111 (diff)
Fix off by one bug in reflog messages written by builtin-fetch
We are adding a space between each argument in the sprintf above so we must account for this as we update our position within the reflog message and append in any remaining arguments. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-fetch.c')
-rw-r--r--builtin-fetch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-fetch.c b/builtin-fetch.c
index c8c24d28a2..016c6e43ec 100644
--- a/builtin-fetch.c
+++ b/builtin-fetch.c
@@ -503,7 +503,7 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
rla_offset = strlen(default_rla);
for (j = 1; j < argc; j++) {
sprintf(default_rla + rla_offset, " %s", argv[j]);
- rla_offset += strlen(argv[j]);
+ rla_offset += strlen(argv[j]) + 1;
}
if (i == argc)