git-mv: fix off-by-one error
Embarassing. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
c5203bdf66
commit
6e17886d37
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user