Thread (1 message) 1 message, 1 author, 2016-06-15
DORMANTno replies

[PATCH 14/16] filter-branch: use $SHELL_PATH instead of 'sh'

From: Jeff King <hidden>
Date: 2016-06-15 22:44:22
Subsystem: kernel build + files below scripts/ (unless maintained elsewhere), the rest · Maintainers: Nathan Chancellor, Nicolas Schier, Linus Torvalds

On some systems, 'sh' isn't very friendly. In particular,
t7003 fails on Solaris because it doesn't understand $().
Instead, use the specified SHELL_PATH to run shell code.

Signed-off-by: Jeff King <redacted>
---
I think this makes sense regardless of the Solaris shell. We should be
consistent about which SHELL_PATH we use in scripts.

 Makefile             |    1 +
 git-filter-branch.sh |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/Makefile b/Makefile
index 8e80225..bd5a623 100644
--- a/Makefile
+++ b/Makefile
@@ -874,6 +874,7 @@ common-cmds.h: $(wildcard Documentation/git-*.txt)
 $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh
 	$(QUIET_GEN)$(RM) $@ $@+ && \
 	sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
+	    -e 's|@SHELL_PATH@|$(SHELL_PATH_SQ)|' \
 	    -e 's|@@PERL@@|$(PERL_PATH_SQ)|g' \
 	    -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
 	    -e 's/@@NO_CURL@@/$(NO_CURL)/g' \
diff --git a/git-filter-branch.sh b/git-filter-branch.sh
index efef732..22b6ed4 100755
--- a/git-filter-branch.sh
+++ b/git-filter-branch.sh
@@ -309,7 +309,7 @@ while read commit parents; do
 	sed -e '1,/^$/d' <../commit | \
 		eval "$filter_msg" > ../message ||
 			die "msg filter failed: $filter_msg"
-	sh -c "$filter_commit" "git commit-tree" \
+	@SHELL_PATH@ -c "$filter_commit" "git commit-tree" \
 		$(git write-tree) $parentstr < ../message > ../map/$commit
 done <../revs
 
-- 
1.5.4.4.543.g30fdd.dirty
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help