diff options
author | Petr Baudis <pasky@ucw.cz> | 2005-04-19 04:16:15 +0200 |
---|---|---|
committer | Petr Baudis <xpasky@machine.sinus.cz> | 2005-05-07 16:09:44 +0200 |
commit | 8c59926f5e00082a4cbf1d9f31275917c5f7f001 (patch) | |
tree | 1e6bdd60480e6bc46522377ba965827f22729062 /merge-cache.c | |
parent | e7d3dd248f50501f98b29c917e70bddcf3ea925a (diff) | |
download | git-8c59926f5e00082a4cbf1d9f31275917c5f7f001.tar.gz |
Make merge-cache not fail immediatelly when the merge program
fails, but go on and return error code at the end. It makes sense
to try to merge everything, then let the user solve the commits
at once.
Diffstat (limited to 'merge-cache.c')
-rw-r--r-- | merge-cache.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/merge-cache.c b/merge-cache.c index 11079b1cda..b2977cf16c 100644 --- a/merge-cache.c +++ b/merge-cache.c @@ -5,6 +5,7 @@ static const char *pgm = NULL; static const char *arguments[8]; +static int err; static void run_program(void) { @@ -25,7 +26,7 @@ static void run_program(void) die("unable to execute '%s'", pgm); } if (waitpid(pid, &status, 0) < 0 || !WIFEXITED(status) || WEXITSTATUS(status)) - die("merge program failed"); + err++; } static int merge_entry(int pos, const char *path) @@ -111,5 +112,7 @@ int main(int argc, char **argv) } merge_file(arg); } + if (err) + die("merge program failed"); return 0; } |