diff options
Diffstat (limited to 'git.c')
| -rw-r--r-- | git.c | 12 | 
1 files changed, 6 insertions, 6 deletions
@@ -188,10 +188,9 @@ static int handle_alias(int *argcp, const char ***argv)  				  alias_command);  		new_argv = xrealloc(new_argv, sizeof(char *) * -				    (count + *argcp + 1)); +				    (count + *argcp));  		/* insert after command name */  		memcpy(new_argv + count, *argv + 1, sizeof(char *) * *argcp); -		new_argv[count+*argcp] = NULL;  		*argv = new_argv;  		*argcp += count - 1; @@ -200,7 +199,7 @@ static int handle_alias(int *argcp, const char ***argv)  	}  	if (subdir && chdir(subdir)) -		die("Cannot change to %s: %s", subdir, strerror(errno)); +		die_errno("Cannot change to '%s'", subdir);  	errno = saved_errno; @@ -246,7 +245,7 @@ static int run_builtin(struct cmd_struct *p, int argc, const char **argv)  	status = p->fn(argc, argv, prefix);  	if (status) -		return status & 0xff; +		return status;  	/* Somebody closed stdout? */  	if (fstat(fileno(stdout), &st)) @@ -257,11 +256,11 @@ static int run_builtin(struct cmd_struct *p, int argc, const char **argv)  	/* Check for ENOSPC and EIO errors.. */  	if (fflush(stdout)) -		die("write failure on standard output: %s", strerror(errno)); +		die_errno("write failure on standard output");  	if (ferror(stdout))  		die("unknown write failure on standard output");  	if (fclose(stdout)) -		die("close failed on standard output: %s", strerror(errno)); +		die_errno("close failed on standard output");  	return 0;  } @@ -327,6 +326,7 @@ static void handle_internal_command(int argc, const char **argv)  		{ "merge-ours", cmd_merge_ours, RUN_SETUP },  		{ "merge-recursive", cmd_merge_recursive, RUN_SETUP | NEED_WORK_TREE },  		{ "merge-subtree", cmd_merge_recursive, RUN_SETUP | NEED_WORK_TREE }, +		{ "mktree", cmd_mktree, RUN_SETUP },  		{ "mv", cmd_mv, RUN_SETUP | NEED_WORK_TREE },  		{ "name-rev", cmd_name_rev, RUN_SETUP },  		{ "pack-objects", cmd_pack_objects, RUN_SETUP },  | 
