diff options
author | Greg Brockman <gdb@MIT.EDU> | 2010-08-07 01:13:39 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-08-11 09:36:23 -0700 |
commit | ad9ac6db5d58de08d0497b9184e86926377c20dd (patch) | |
tree | 02a6ec6fd2fd40799d9d1c4c1fcba657b5adbcc4 /builtin/merge.c | |
parent | 64fdc08dac6694d1e754580e7acb82dfa4988bb9 (diff) | |
download | git-ad9ac6db5d58de08d0497b9184e86926377c20dd.tar.gz git-ad9ac6db5d58de08d0497b9184e86926377c20dd.tar.xz |
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 <gdb@mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/merge.c')
-rw-r--r-- | builtin/merge.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/merge.c b/builtin/merge.c index 37ce4f589..b48826372 100644 --- a/builtin/merge.c +++ b/builtin/merge.c @@ -486,7 +486,8 @@ static int git_merge_config(const char *k, const char *v, void *cb) buf = xstrdup(v); argc = split_cmdline(buf, &argv); if (argc < 0) - die("Bad branch.%s.mergeoptions string", branch); + die("Bad branch.%s.mergeoptions string: %s", branch, + split_cmdline_strerror(argc)); argv = xrealloc(argv, sizeof(*argv) * (argc + 2)); memmove(argv + 1, argv, sizeof(*argv) * (argc + 1)); argc++; |