]> git.ipfire.org Git - thirdparty/git.git/commit
Wait for child on signal death for aliases to externals
authorTrygve Aaberge <trygveaa@gmail.com>
Tue, 7 Jul 2020 12:17:15 +0000 (14:17 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 7 Jul 2020 20:15:13 +0000 (13:15 -0700)
commitc0d73a59c956ace5e02c9f0fab336ac4dbe64102
tree5e511f8ce055d1ec618f2da8403e8345a433f205
parente662df7e830a9d93ca36b74a7b5e670e139b0da1
Wait for child on signal death for aliases to externals

When we are running an alias to an external command, we want to wait for
that process to exit even after receiving ^C which normally kills the
git process. This is useful when the process is ignoring SIGINT (which
e.g. pagers often do), and then we don't want it to be killed.

Having an alias which invokes a pager is probably not common, but it can
be useful e.g. if you have an alias to a git command which uses a
subshell as one of the arguments (in which case you have to use an
external command, not an alias to a builtin).

This patch is similar to the previous commit, but the previous commit
fixed this only for aliases to builtins, while this commit does the same
for aliases to external commands. In addition to waiting after clean
like the previous commit, this also enables cleaning the child (that was
already enabled for aliases to builtins before the previous commit),
because wait_after_clean relies on it. Lastly, while the previous commit
fixed a regression, I don't think this has ever worked properly.

Signed-off-by: Trygve Aaberge <trygveaa@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git.c