summaryrefslogtreecommitdiff
path: root/archive-tar.c
diff options
context:
space:
mode:
authorChristian Couder <christian.couder@gmail.com>2016-08-08 21:03:11 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-08-11 19:41:47 (GMT)
commitfef7ba5353095e87b3bcd712fa15eb71e1f53b30 (patch)
tree168a21ef624196031baf18649554c093599017dc /archive-tar.c
parentb6446d54ec70817ddd96b5c9668dd74a996719bf (diff)
downloadgit-fef7ba5353095e87b3bcd712fa15eb71e1f53b30.zip
git-fef7ba5353095e87b3bcd712fa15eb71e1f53b30.tar.gz
git-fef7ba5353095e87b3bcd712fa15eb71e1f53b30.tar.bz2
builtin/apply: make apply_all_patches() return 128 or 1 on error
To finish libifying the apply functionality, apply_all_patches() should not die() or exit() in case of error, but return either 128 or 1, so that it gives the same exit code as when die() or exit(1) is called. This way scripts relying on the exit code don't need to be changed. While doing that we must take care that file descriptors are properly closed and, if needed, reset to a sensible value. Also, according to the lockfile API, when finished with a lockfile, one should either commit it or roll it back. This is even more important now that the same lockfile can be passed to init_apply_state() many times to be reused by series of calls to the apply lib functions. Helped-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Helped-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Helped-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'archive-tar.c')
0 files changed, 0 insertions, 0 deletions