Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
git-mv: fix off-by-one error
author
Johannes Schindelin
<Johannes.Schindelin@gmx.de>
Mon, 21 Aug 2006 20:22:25 +0000
(22:22 +0200)
committer
Junio C Hamano
<junkio@cox.net>
Mon, 21 Aug 2006 21:15:45 +0000
(14:15 -0700)
Embarassing.
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-mv.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
c5203bd
)
diff --git
a/builtin-mv.c
b/builtin-mv.c
index b2ecc26f238f9f2a7297164145a19397c124b96f..e3bc7a86bb0732f5db760151088c73c87f88e637 100644
(file)
--- a/
builtin-mv.c
+++ b/
builtin-mv.c
@@
-26,7
+26,7
@@
static const char **copy_pathspec(const char *prefix, const char **pathspec,
if (length > 0 && result[i][length - 1] == '/') {
char *without_slash = xmalloc(length);
memcpy(without_slash, result[i], length - 1);
- without_slash[length] = '\0';
+ without_slash[length
- 1
] = '\0';
result[i] = without_slash;
}
if (base_name) {