{"thread":{"id":"58450","subject":"[PATCH] scalar: fix wrong shell hashbang","startedAt":"2022-09-17T13:11:28Z","lastAt":"2022-09-20T12:47:20Z","messageCount":4,"participants":["ZheNing Hu via GitGitGadget","Victoria Dye","Junio C Hamano","ZheNing Hu"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"463138","messageId":"pull.1355.git.1663420281187.gitgitgadget@gmail.com","threadId":"58450","inReplyTo":null,"subject":"[PATCH] scalar: fix wrong shell hashbang","fromName":"ZheNing Hu via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2022-09-17T13:11:21Z","receivedAt":"2022-09-17T13:11:28Z","isPatch":true,"sender":{"key":"adlternative@gmail.com","avatar":"https://avatars.githubusercontent.com/u/58138461?v=4"},"body":"From: ZheNing Hu <adlternative@gmail.com>\n\n$SHELL_PATH_SQ haven't been set in scalar's Makefile,\nbin-wrappers/scalar will begin with wrong hashbang \"#!\",\nfix it by setting $SHELL_PATH and $SHELL_PATH_SQ in\nscalar's Makefile.\n\nSigned-off-by: ZheNing Hu <adlternative@gmail.com>\n---\n    scalar: fix wrong shell hashbang\n    \n    The bin-wrappers/scalar seems like missing setting $SHELL_PATH_SQ which\n    lead to I can't execute bin-wrappers/scalar correctly, which output\n    error:\n    \n    zsh: exec format error: scalar\n    \n    (this bug will not turn out in bash)\n    \n    The bin-wrappers/scalar begin with wrong hashbang \"#!\", which cannot\n    figure out by zsh. So this patch want to fix this problem.\n    \n    v1: Setting $SHELL_PATH and $SHELL_PATH_SQ in scalar/Makefile.\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-1355%2Fadlternative%2Fzh%2Fscalar-fix-hashbang-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1355/adlternative/zh/scalar-fix-hashbang-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/1355\n\n contrib/scalar/Makefile | 3 +++\n 1 file changed, 3 insertions(+)\n\ndiff --git a/contrib/scalar/Makefile b/contrib/scalar/Makefile\nindex 37f283f35d7..b2a81d9eb45 100644\n--- a/contrib/scalar/Makefile\n+++ b/contrib/scalar/Makefile\n@@ -8,6 +8,9 @@ include ../../config.mak.uname\n -include ../../config.mak.autogen\n -include ../../config.mak\n \n+SHELL_PATH ?= $(SHELL)\n+SHELL_PATH_SQ = $(subst ','\\'',$(SHELL_PATH))\n+\n TARGETS = scalar$(X) scalar.o\n GITLIBS = ../../common-main.o ../../libgit.a ../../xdiff/lib.a\n \n\nbase-commit: d3fa443f97e3a8d75b51341e2d5bac380b7422df\n-- \ngitgitgadget\n"},{"id":"463158","messageId":"433bf552-db20-9989-92c5-ee625ce9337a@github.com","threadId":"58450","inReplyTo":"pull.1355.git.1663420281187.gitgitgadget@gmail.com","subject":"Re: [PATCH] scalar: fix wrong shell hashbang","fromName":"Victoria Dye","fromEmail":"vdye@github.com","sentAt":"2022-09-18T20:08:33Z","receivedAt":"2022-09-18T20:12:24Z","isPatch":true,"sender":{"key":"vdye@github.com","avatar":"https://avatars.githubusercontent.com/u/3619353?v=4"},"body":"ZheNing Hu via GitGitGadget wrote:\n> From: ZheNing Hu <adlternative@gmail.com>\n> \n> $SHELL_PATH_SQ haven't been set in scalar's Makefile,\n> bin-wrappers/scalar will begin with wrong hashbang \"#!\",\n> fix it by setting $SHELL_PATH and $SHELL_PATH_SQ in\n> scalar's Makefile.\n> \n> Signed-off-by: ZheNing Hu <adlternative@gmail.com>\n> ---\n>     scalar: fix wrong shell hashbang\n>     \n>     The bin-wrappers/scalar seems like missing setting $SHELL_PATH_SQ which\n>     lead to I can't execute bin-wrappers/scalar correctly, which output\n>     error:\n>     \n>     zsh: exec format error: scalar\n>     \n>     (this bug will not turn out in bash)\n>     \n>     The bin-wrappers/scalar begin with wrong hashbang \"#!\", which cannot\n>     figure out by zsh. So this patch want to fix this problem.\n>     \n>     v1: Setting $SHELL_PATH and $SHELL_PATH_SQ in scalar/Makefile.\n> \n\nThanks for finding this! However, while your patch fixes the error you've\nidentified (I was able to recreate both the original issue and apply your\npatch to fix it), I believe it has already been fixed in 'next' by\n7b5c93c6c6 (scalar: include in standard Git build & installation,\n2022-09-02) (archive: [1]).\n\n[1] https://lore.kernel.org/git/bc2092a7a7aae640b547bde8db0c0a26ce31278a.1662134210.git.gitgitgadget@gmail.com/\n"},{"id":"463221","messageId":"xmqqillj9pbc.fsf@gitster.g","threadId":"58450","inReplyTo":"433bf552-db20-9989-92c5-ee625ce9337a@github.com","subject":"Re: [PATCH] scalar: fix wrong shell hashbang","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2022-09-19T18:44:39Z","receivedAt":"2022-09-19T18:44:51Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Victoria Dye <vdye@github.com> writes:\n\n> Thanks for finding this! However, while your patch fixes the error you've\n> identified (I was able to recreate both the original issue and apply your\n> patch to fix it), I believe it has already been fixed in 'next' by\n> 7b5c93c6c6 (scalar: include in standard Git build & installation,\n> 2022-09-02) (archive: [1]).\n\nYup, thanks.  The topic that contains that commit should graduate to\nthe master branch before -rc1, like this afternoon ;-)\n\n"},{"id":"463303","messageId":"CAOLTT8Rxh7dVJL6gGe1KPnTNOgPdQky06deOe0L5qczE0eh64g@mail.gmail.com","threadId":"58450","inReplyTo":"433bf552-db20-9989-92c5-ee625ce9337a@github.com","subject":"Re: [PATCH] scalar: fix wrong shell hashbang","fromName":"ZheNing Hu","fromEmail":"adlternative@gmail.com","sentAt":"2022-09-20T12:43:40Z","receivedAt":"2022-09-20T12:47:20Z","isPatch":true,"sender":{"key":"adlternative@gmail.com","avatar":"https://avatars.githubusercontent.com/u/58138461?v=4"},"body":"Victoria Dye <vdye@github.com> 于2022年9月19日周一 04:08写道：\n>\n> ZheNing Hu via GitGitGadget wrote:\n> > From: ZheNing Hu <adlternative@gmail.com>\n> >\n> > $SHELL_PATH_SQ haven't been set in scalar's Makefile,\n> > bin-wrappers/scalar will begin with wrong hashbang \"#!\",\n> > fix it by setting $SHELL_PATH and $SHELL_PATH_SQ in\n> > scalar's Makefile.\n> >\n> > Signed-off-by: ZheNing Hu <adlternative@gmail.com>\n> > ---\n> >     scalar: fix wrong shell hashbang\n> >\n> >     The bin-wrappers/scalar seems like missing setting $SHELL_PATH_SQ which\n> >     lead to I can't execute bin-wrappers/scalar correctly, which output\n> >     error:\n> >\n> >     zsh: exec format error: scalar\n> >\n> >     (this bug will not turn out in bash)\n> >\n> >     The bin-wrappers/scalar begin with wrong hashbang \"#!\", which cannot\n> >     figure out by zsh. So this patch want to fix this problem.\n> >\n> >     v1: Setting $SHELL_PATH and $SHELL_PATH_SQ in scalar/Makefile.\n> >\n>\n> Thanks for finding this! However, while your patch fixes the error you've\n> identified (I was able to recreate both the original issue and apply your\n> patch to fix it), I believe it has already been fixed in 'next' by\n> 7b5c93c6c6 (scalar: include in standard Git build & installation,\n> 2022-09-02) (archive: [1]).\n>\n> [1] https://lore.kernel.org/git/bc2092a7a7aae640b547bde8db0c0a26ce31278a.1662134210.git.gitgitgadget@gmail.com/\n\nIt seems that this problem has been solved, thanks!\n\n--\nZheNing Hu\n"}]}