path: root/git.c
diff options
authorGreg Brockman <gdb@MIT.EDU>2010-08-07 05:13:39 (GMT)
committerJunio C Hamano <>2010-08-11 16:36:23 (GMT)
commitad9ac6db5d58de08d0497b9184e86926377c20dd (patch)
tree02a6ec6fd2fd40799d9d1c4c1fcba657b5adbcc4 /git.c
parent64fdc08dac6694d1e754580e7acb82dfa4988bb9 (diff)
split_cmdline: Allow caller to access error string
This allows the caller to add its own error message to that returned by split_cmdline. Thus error output following a failed split_cmdline can be of the form fatal: Bad alias.test string: cmdline ends with \ rather than error: cmdline ends with \ fatal: Bad alias.test string Signed-off-by: Greg Brockman <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'git.c')
1 files changed, 2 insertions, 1 deletions
diff --git a/git.c b/git.c
index 1753811..da56f31 100644
--- a/git.c
+++ b/git.c
@@ -188,7 +188,8 @@ static int handle_alias(int *argcp, const char ***argv)
count = split_cmdline(alias_string, &new_argv);
if (count < 0)
- die("Bad alias.%s string", alias_command);
+ die("Bad alias.%s string: %s", alias_command,
+ split_cmdline_strerror(count));
option_count = handle_options(&new_argv, &count, &envchanged);
if (envchanged)
die("alias '%s' changes environment variables\n"