mirror of
https://github.com/git/git.git
synced 2024-05-28 02:16:29 +02:00
Using 'perl' in *.sh
Some GIT's shell script are using bare 'perl' for perl invocation. Use @@PERL@@ symbol and replace it with PERL_PATH_SQ everywhere. Signed-off-by: Michal Rokos <michal.rokos@nextsoft.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
6e959ab05a
commit
d9bffc08fd
1
Makefile
1
Makefile
|
@ -514,6 +514,7 @@ common-cmds.h: Documentation/git-*.txt
|
||||||
$(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh
|
$(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh
|
||||||
rm -f $@ $@+
|
rm -f $@ $@+
|
||||||
sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
|
sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
|
||||||
|
-e 's|@@PERL@@|$(PERL_PATH_SQ)|g' \
|
||||||
-e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
|
-e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
|
||||||
-e 's/@@NO_CURL@@/$(NO_CURL)/g' \
|
-e 's/@@NO_CURL@@/$(NO_CURL)/g' \
|
||||||
-e 's/@@NO_PYTHON@@/$(NO_PYTHON)/g' \
|
-e 's/@@NO_PYTHON@@/$(NO_PYTHON)/g' \
|
||||||
|
|
|
@ -13,7 +13,7 @@ git bisect log show bisect log.'
|
||||||
. git-sh-setup
|
. git-sh-setup
|
||||||
|
|
||||||
sq() {
|
sq() {
|
||||||
perl -e '
|
@@PERL@@ -e '
|
||||||
for (@ARGV) {
|
for (@ARGV) {
|
||||||
s/'\''/'\'\\\\\'\''/g;
|
s/'\''/'\'\\\\\'\''/g;
|
||||||
print " '\''$_'\''";
|
print " '\''$_'\''";
|
||||||
|
|
|
@ -324,7 +324,7 @@ test -d "$GIT_DIR/refs/reference-tmp" && rm -fr "$GIT_DIR/refs/reference-tmp"
|
||||||
if test -f "$GIT_DIR/CLONE_HEAD"
|
if test -f "$GIT_DIR/CLONE_HEAD"
|
||||||
then
|
then
|
||||||
# Read git-fetch-pack -k output and store the remote branches.
|
# Read git-fetch-pack -k output and store the remote branches.
|
||||||
perl -e "$copy_refs" "$GIT_DIR" "$use_separate_remote" "$origin"
|
@@PERL@@ -e "$copy_refs" "$GIT_DIR" "$use_separate_remote" "$origin"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd "$D" || exit
|
cd "$D" || exit
|
||||||
|
|
|
@ -147,7 +147,7 @@ run_status () {
|
||||||
git-ls-files -z --others $option \
|
git-ls-files -z --others $option \
|
||||||
--exclude-per-directory=.gitignore
|
--exclude-per-directory=.gitignore
|
||||||
fi |
|
fi |
|
||||||
perl -e '$/ = "\0";
|
@@PERL@@ -e '$/ = "\0";
|
||||||
my $shown = 0;
|
my $shown = 0;
|
||||||
while (<>) {
|
while (<>) {
|
||||||
chomp;
|
chomp;
|
||||||
|
|
|
@ -278,7 +278,7 @@ fetch_main () {
|
||||||
head="ref: $remote_name"
|
head="ref: $remote_name"
|
||||||
while (expr "z$head" : "zref:" && expr $depth \< $max_depth) >/dev/null
|
while (expr "z$head" : "zref:" && expr $depth \< $max_depth) >/dev/null
|
||||||
do
|
do
|
||||||
remote_name_quoted=$(perl -e '
|
remote_name_quoted=$(@@PERL@@ -e '
|
||||||
my $u = $ARGV[0];
|
my $u = $ARGV[0];
|
||||||
$u =~ s/^ref:\s*//;
|
$u =~ s/^ref:\s*//;
|
||||||
$u =~ s{([^-a-zA-Z0-9/.])}{sprintf"%%%02x",ord($1)}eg;
|
$u =~ s{([^-a-zA-Z0-9/.])}{sprintf"%%%02x",ord($1)}eg;
|
||||||
|
|
|
@ -311,7 +311,7 @@ echo "$prev_head" > "$dotest/prev_head"
|
||||||
|
|
||||||
msgnum=0
|
msgnum=0
|
||||||
for cmt in `git-rev-list --no-merges "$upstream"..ORIG_HEAD \
|
for cmt in `git-rev-list --no-merges "$upstream"..ORIG_HEAD \
|
||||||
| perl -e 'print reverse <>'`
|
| @@PERL@@ -e 'print reverse <>'`
|
||||||
do
|
do
|
||||||
msgnum=$(($msgnum + 1))
|
msgnum=$(($msgnum + 1))
|
||||||
echo "$cmt" > "$dotest/cmt.$msgnum"
|
echo "$cmt" > "$dotest/cmt.$msgnum"
|
||||||
|
|
Loading…
Reference in New Issue