Browse Source

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>
maint
Johannes Schindelin 9 years ago committed by Junio C Hamano
parent
commit
fbc87eb544
  1. 4
      merge-recursive.c

4
merge-recursive.c

@ -1888,8 +1888,8 @@ int merge_trees(struct merge_options *o, @@ -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;
}

Loading…
Cancel
Save