]> git.ipfire.org Git - thirdparty/git.git/commitdiff
upload-pack: remove superfluous sigchain_pop() call
authorRené Scharfe <l.s.r@web.de>
Tue, 11 Aug 2020 17:15:03 +0000 (19:15 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 11 Aug 2020 21:01:18 +0000 (14:01 -0700)
2997178ee6 (upload-pack: split check_unreachable() in two, prep for
get_reachable_list(), 2016-06-12) moved most code of has_unreachable()
into the new function do_reachable_revlist().  The latter takes care to
ignore SIGPIPE during its operations, and restores the original signal
handler before returning.

However, a sigchain_pop(SIGPIPE) call remained in the error handling
code of has_unreachable(), which does nothing because the stack is
empty after do_reachable_revlist() cleaned up after itself.  Remove it.

Signed-off-by: René Scharfe <l.s.r@web.de>
Reviewed-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
upload-pack.c

index 951a2b23aaf8f03d08f8976557de8616bbb2b5ca..2f3ebd88b7fc991c0439bb31efc258e1ab290b30 100644 (file)
@@ -731,7 +731,6 @@ static int has_unreachable(struct object_array *src, enum allow_uor allow_uor)
        return 0;
 
 error:
-       sigchain_pop(SIGPIPE);
        if (cmd.out >= 0)
                close(cmd.out);
        return 1;