summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-27 17:21:13 (GMT)
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-27 17:21:13 (GMT)
commit4765dd57e6115d6e04e26a652676f02abe9c143d (patch)
tree37f46a6a23ddf614a1f2c2dbf7c09a309a11ac7a
parentc9cddabe997e4342eb7acfc3f5922e85baddb300 (diff)
downloadgit-4765dd57e6115d6e04e26a652676f02abe9c143d.zip
git-4765dd57e6115d6e04e26a652676f02abe9c143d.tar.gz
git-4765dd57e6115d6e04e26a652676f02abe9c143d.tar.bz2
diff.c: don't add extra '/' to pathname
The "base" string already contains any finishing "/", so the way to get the full pathname is to just concatenate the base and path directly, with no extra slashes in between.
-rw-r--r--diff.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/diff.c b/diff.c
index 7383489..4cc41f0 100644
--- a/diff.c
+++ b/diff.c
@@ -256,7 +256,6 @@ void diff_addremove(int addremove, unsigned mode,
if (path) {
strcpy(concatpath, base);
- strcat(concatpath, "/");
strcat(concatpath, path);
}
run_external_diff(path ? concatpath : base, one, two);
@@ -278,7 +277,6 @@ void diff_change(unsigned old_mode, unsigned new_mode,
if (path) {
strcpy(concatpath, base);
- strcat(concatpath, "/");
strcat(concatpath, path);
}
run_external_diff(path ? concatpath : base, &spec[0], &spec[1]);