* [PATCH] scalar: fix wrong shell hashbang
@ 2022-09-17 13:11 ZheNing Hu via GitGitGadget
2022-09-18 20:08 ` Victoria Dye
0 siblings, 1 reply; 4+ messages in thread
From: ZheNing Hu via GitGitGadget @ 2022-09-17 13:11 UTC (permalink / raw)
To: git
Cc: Junio C Hamano, Derrick Stolee, Johannes Schindelin, ZheNing Hu,
ZheNing Hu
From: ZheNing Hu <adlternative@gmail.com>
$SHELL_PATH_SQ haven't been set in scalar's Makefile,
bin-wrappers/scalar will begin with wrong hashbang "#!",
fix it by setting $SHELL_PATH and $SHELL_PATH_SQ in
scalar's Makefile.
Signed-off-by: ZheNing Hu <adlternative@gmail.com>
---
scalar: fix wrong shell hashbang
The bin-wrappers/scalar seems like missing setting $SHELL_PATH_SQ which
lead to I can't execute bin-wrappers/scalar correctly, which output
error:
zsh: exec format error: scalar
(this bug will not turn out in bash)
The bin-wrappers/scalar begin with wrong hashbang "#!", which cannot
figure out by zsh. So this patch want to fix this problem.
v1: Setting $SHELL_PATH and $SHELL_PATH_SQ in scalar/Makefile.
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1355%2Fadlternative%2Fzh%2Fscalar-fix-hashbang-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1355/adlternative/zh/scalar-fix-hashbang-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1355
contrib/scalar/Makefile | 3 +++
1 file changed, 3 insertions(+)
diff --git a/contrib/scalar/Makefile b/contrib/scalar/Makefile
index 37f283f35d7..b2a81d9eb45 100644
--- a/contrib/scalar/Makefile
+++ b/contrib/scalar/Makefile
@@ -8,6 +8,9 @@ include ../../config.mak.uname
-include ../../config.mak.autogen
-include ../../config.mak
+SHELL_PATH ?= $(SHELL)
+SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
+
TARGETS = scalar$(X) scalar.o
GITLIBS = ../../common-main.o ../../libgit.a ../../xdiff/lib.a
base-commit: d3fa443f97e3a8d75b51341e2d5bac380b7422df
--
gitgitgadget
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] scalar: fix wrong shell hashbang
2022-09-17 13:11 [PATCH] scalar: fix wrong shell hashbang ZheNing Hu via GitGitGadget
@ 2022-09-18 20:08 ` Victoria Dye
2022-09-19 18:44 ` Junio C Hamano
2022-09-20 12:43 ` ZheNing Hu
0 siblings, 2 replies; 4+ messages in thread
From: Victoria Dye @ 2022-09-18 20:08 UTC (permalink / raw)
To: ZheNing Hu via GitGitGadget, git
Cc: Junio C Hamano, Derrick Stolee, Johannes Schindelin, ZheNing Hu
ZheNing Hu via GitGitGadget wrote:
> From: ZheNing Hu <adlternative@gmail.com>
>
> $SHELL_PATH_SQ haven't been set in scalar's Makefile,
> bin-wrappers/scalar will begin with wrong hashbang "#!",
> fix it by setting $SHELL_PATH and $SHELL_PATH_SQ in
> scalar's Makefile.
>
> Signed-off-by: ZheNing Hu <adlternative@gmail.com>
> ---
> scalar: fix wrong shell hashbang
>
> The bin-wrappers/scalar seems like missing setting $SHELL_PATH_SQ which
> lead to I can't execute bin-wrappers/scalar correctly, which output
> error:
>
> zsh: exec format error: scalar
>
> (this bug will not turn out in bash)
>
> The bin-wrappers/scalar begin with wrong hashbang "#!", which cannot
> figure out by zsh. So this patch want to fix this problem.
>
> v1: Setting $SHELL_PATH and $SHELL_PATH_SQ in scalar/Makefile.
>
Thanks for finding this! However, while your patch fixes the error you've
identified (I was able to recreate both the original issue and apply your
patch to fix it), I believe it has already been fixed in 'next' by
7b5c93c6c6 (scalar: include in standard Git build & installation,
2022-09-02) (archive: [1]).
[1] https://lore.kernel.org/git/bc2092a7a7aae640b547bde8db0c0a26ce31278a.1662134210.git.gitgitgadget@gmail.com/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scalar: fix wrong shell hashbang
2022-09-18 20:08 ` Victoria Dye
@ 2022-09-19 18:44 ` Junio C Hamano
2022-09-20 12:43 ` ZheNing Hu
1 sibling, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2022-09-19 18:44 UTC (permalink / raw)
To: Victoria Dye
Cc: ZheNing Hu via GitGitGadget, git, Derrick Stolee,
Johannes Schindelin, ZheNing Hu
Victoria Dye <vdye@github.com> writes:
> Thanks for finding this! However, while your patch fixes the error you've
> identified (I was able to recreate both the original issue and apply your
> patch to fix it), I believe it has already been fixed in 'next' by
> 7b5c93c6c6 (scalar: include in standard Git build & installation,
> 2022-09-02) (archive: [1]).
Yup, thanks. The topic that contains that commit should graduate to
the master branch before -rc1, like this afternoon ;-)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scalar: fix wrong shell hashbang
2022-09-18 20:08 ` Victoria Dye
2022-09-19 18:44 ` Junio C Hamano
@ 2022-09-20 12:43 ` ZheNing Hu
1 sibling, 0 replies; 4+ messages in thread
From: ZheNing Hu @ 2022-09-20 12:43 UTC (permalink / raw)
To: Victoria Dye
Cc: ZheNing Hu via GitGitGadget, Git List, Junio C Hamano,
Derrick Stolee, Johannes Schindelin
Victoria Dye <vdye@github.com> 于2022年9月19日周一 04:08写道:
>
> ZheNing Hu via GitGitGadget wrote:
> > From: ZheNing Hu <adlternative@gmail.com>
> >
> > $SHELL_PATH_SQ haven't been set in scalar's Makefile,
> > bin-wrappers/scalar will begin with wrong hashbang "#!",
> > fix it by setting $SHELL_PATH and $SHELL_PATH_SQ in
> > scalar's Makefile.
> >
> > Signed-off-by: ZheNing Hu <adlternative@gmail.com>
> > ---
> > scalar: fix wrong shell hashbang
> >
> > The bin-wrappers/scalar seems like missing setting $SHELL_PATH_SQ which
> > lead to I can't execute bin-wrappers/scalar correctly, which output
> > error:
> >
> > zsh: exec format error: scalar
> >
> > (this bug will not turn out in bash)
> >
> > The bin-wrappers/scalar begin with wrong hashbang "#!", which cannot
> > figure out by zsh. So this patch want to fix this problem.
> >
> > v1: Setting $SHELL_PATH and $SHELL_PATH_SQ in scalar/Makefile.
> >
>
> Thanks for finding this! However, while your patch fixes the error you've
> identified (I was able to recreate both the original issue and apply your
> patch to fix it), I believe it has already been fixed in 'next' by
> 7b5c93c6c6 (scalar: include in standard Git build & installation,
> 2022-09-02) (archive: [1]).
>
> [1] https://lore.kernel.org/git/bc2092a7a7aae640b547bde8db0c0a26ce31278a.1662134210.git.gitgitgadget@gmail.com/
It seems that this problem has been solved, thanks!
--
ZheNing Hu
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-09-20 12:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-17 13:11 [PATCH] scalar: fix wrong shell hashbang ZheNing Hu via GitGitGadget
2022-09-18 20:08 ` Victoria Dye
2022-09-19 18:44 ` Junio C Hamano
2022-09-20 12:43 ` ZheNing Hu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).