summaryrefslogtreecommitdiff
path: root/git.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <junkio@cox.net>2006-06-17 17:08:36 -0700
committerLibravatar Junio C Hamano <junkio@cox.net>2006-06-17 17:08:36 -0700
commitfc5201ac9f17abf8b70b248b17595f3f3d35c056 (patch)
tree59d1b7aa95bddfce3c535e8a3c752ef9298ff632 /git.c
parentMerge branch 'master' into next (diff)
parentdiff options: add --color (diff)
downloadtgif-fc5201ac9f17abf8b70b248b17595f3f3d35c056.tar.xz
Merge branch 'js/diff'
Diffstat (limited to 'git.c')
-rw-r--r--git.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/git.c b/git.c
index 9469d44b4b..329ebec78c 100644
--- a/git.c
+++ b/git.c
@@ -122,9 +122,9 @@ static int handle_alias(int *argcp, const char ***argv)
/* insert after command name */
if (*argcp > 1) {
new_argv = realloc(new_argv, sizeof(char*) *
- (count + *argcp - 1));
- memcpy(new_argv + count, *argv, sizeof(char*) *
- (*argcp - 1));
+ (count + *argcp));
+ memcpy(new_argv + count, *argv + 1,
+ sizeof(char*) * *argcp);
}
*argv = new_argv;