From: Markus Heidelberg Date: Mon, 19 Jan 2009 23:38:16 +0000 (+0100) Subject: contrib/difftool: change trap condition from SIGINT to INT X-Git-Tag: v1.6.2-rc0~120 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f13bfc1be7d25955e3ff5563fb6e35d03a408b4e;p=git.git contrib/difftool: change trap condition from SIGINT to INT git-difftool worked for me on an up-to-date Gentoo Linux at home, but didn't work on a somewhat older Ubuntu Linux 7.10 at work and failed with the following error, where 'Makefile' was locally modified: trap: 244: SIGINT: bad trap external diff died, stopping at Makefile. In 'man 1p trap' there is written: "The condition can be EXIT, 0 (equivalent to EXIT), or a signal specified using a symbolic name, without the SIG prefix, [...]" "Implementations may permit names with the SIG prefix or ignore case in signal names as an extension." So now we do it the POSIX compliant way instead of using an extension. Signed-off-by: Markus Heidelberg Signed-off-by: Junio C Hamano --- diff --git a/contrib/difftool/git-difftool-helper b/contrib/difftool/git-difftool-helper index f013726d0..a2eb59b0f 100755 --- a/contrib/difftool/git-difftool-helper +++ b/contrib/difftool/git-difftool-helper @@ -53,7 +53,7 @@ launch_merge_tool () { # Create and ensure that we clean up $BACKUP test -f "$MERGED" && cp -- "$MERGED" "$BACKUP" - trap sigint_handler SIGINT + trap sigint_handler INT # $LOCAL and $REMOTE are temporary files so prompt # the user with the real $MERGED name before launching $merge_tool.