@matheusbsbs / matheus-bagliano / commits / f13bfc1be7
Fork 0

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 <markus.heidelberg@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Markus Heidelberg committed Jan 20, 2009 at 00:38 UTC f13bfc1be7d25955e3ff5563fb6e35d03a408b4e
1 file changed +1 -1
contrib/difftool/git-difftool-helper
+1 -1
@@ -53,7 +53,7 @@ launch_merge_tool () {
53
54 # Create and ensure that we clean up $BACKUP
55 test -f "$MERGED" && cp -- "$MERGED" "$BACKUP"
56 - trap sigint_handler SIGINT
56 + trap sigint_handler INT
57
58 # $LOCAL and $REMOTE are temporary files so prompt
59 # the user with the real $MERGED name before launching $merge_tool.