From 80f0e53d6bdde5d9be016e5cfbb5ff7c0257a00e Mon Sep 17 00:00:00 2001 From: Johannes Sixt Date: Wed, 25 Mar 2009 12:48:30 +0100 Subject: [PATCH 1/2] t7005-editor: Use $SHELL_PATH in the editor scripts The test sets up various shell scripts and uses them as commit message editors. On Windows, we need a shebang line in order to recognize the files as executable shell scripts. This adds it. Signed-off-by: Johannes Sixt --- t/t7005-editor.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/t/t7005-editor.sh b/t/t7005-editor.sh index 2f8404afbb..e83bc8fd89 100755 --- a/t/t7005-editor.sh +++ b/t/t7005-editor.sh @@ -7,6 +7,7 @@ test_description='GIT_EDITOR, core.editor, and stuff' for i in GIT_EDITOR core_editor EDITOR VISUAL vi do cat >e-$i.sh <<-EOF + #!$SHELL_PATH echo "Edited by $i" >"\$1" EOF chmod +x e-$i.sh From fb9a2beab2002894fb970cba4e32ebb1c41176b2 Mon Sep 17 00:00:00 2001 From: Johannes Sixt Date: Wed, 25 Mar 2009 13:21:15 +0100 Subject: [PATCH 2/2] t7502-commit: Skip SIGTERM test on Windows The implementation of exec on Windows is just a rough approximation of the POSIX behavior. In particular, no real process "overlay" happens (a new process is spawned instead and the parent process waits until the child terminates). In particular, the process ID cannot be taken by the exec'd process. But there is one test in t7502-commit.sh that depends on this. We have to skip it on Windows. Signed-off-by: Johannes Sixt --- t/t7502-commit.sh | 2 +- t/test-lib.sh | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/t/t7502-commit.sh b/t/t7502-commit.sh index ad42c78d7c..56cd866019 100755 --- a/t/t7502-commit.sh +++ b/t/t7502-commit.sh @@ -234,7 +234,7 @@ cat >.git/FAKE_EDITOR <>negative && ! "$SHELL_PATH" -c '\'' echo kill -TERM $$ >> .git/FAKE_EDITOR diff --git a/t/test-lib.sh b/t/test-lib.sh index b4b626e837..572301df1b 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -689,10 +689,12 @@ case $(uname -s) in } # no POSIX permissions # backslashes in pathspec are converted to '/' + # exec does not inherit the PID ;; *) test_set_prereq POSIXPERM test_set_prereq BSLASHPSPEC + test_set_prereq EXECKEEPSPID ;; esac