diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2016-07-26 18:06:17 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-07-26 11:13:44 -0700 |
commit | fbc87eb54409b5c7b080f1c23b767daefc9d6ede (patch) | |
tree | 6b3935a387378544caf4d26f13cef11ed2863cf5 /merge-recursive.c | |
parent | 3c8a51e89a90cb2a4016b1c30a10c7245bbdbeda (diff) | |
download | git-fbc87eb54409b5c7b080f1c23b767daefc9d6ede.tar.gz git-fbc87eb54409b5c7b080f1c23b767daefc9d6ede.tar.xz |
merge-recursive: allow write_tree_from_memory() to error out
It is possible that a tree cannot be written (think: disk full). We
will want to give the caller a chance to clean up instead of letting
the program die() in such a case.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'merge-recursive.c')
-rw-r--r-- | merge-recursive.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/merge-recursive.c b/merge-recursive.c index 2be1e17e0..1f86338ad 100644 --- a/merge-recursive.c +++ b/merge-recursive.c @@ -1888,8 +1888,8 @@ int merge_trees(struct merge_options *o, else clean = 1; - if (o->call_depth) - *result = write_tree_from_memory(o); + if (o->call_depth && !(*result = write_tree_from_memory(o))) + return -1; return clean; } |