{"thread":{"id":"524","subject":"[PATCH]: git-merge-one-file-script use /usr/bin/env to call bash","startedAt":"2005-05-07T08:45:49Z","lastAt":"2005-05-09T14:47:18Z","messageCount":11,"participants":["Thomas Glanzmann","Junio C Hamano","bert hubert","Martin Waitz","Morten Welinder","H. Peter Anvin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"2736","messageId":"20050507084549.GF23680@cip.informatik.uni-erlangen.de","threadId":"524","inReplyTo":null,"subject":"[PATCH]: git-merge-one-file-script use /usr/bin/env to call bash","fromName":"Thomas Glanzmann","fromEmail":"sithglan@stud.uni-erlangen.de","sentAt":"2005-05-07T08:45:49Z","receivedAt":"2005-05-07T08:45:49Z","isPatch":true,"sender":{"key":"sithglan@stud.uni-erlangen.de","avatar":null},"body":"[PATCH]: git-merge-one-file-script use /usr/bin/env to call bash\n\nSigned-Off-by: Thomas Glanzmann <sithglan@stud.uni-erlangen.de>\n\n--- a/git-merge-one-file-script\n+++ b/git-merge-one-file-script\n@@ -1,4 +1,4 @@\n-#!/bin/sh\n+#!/usr/bin/env bash\n #\n # This is the git merge script, called with\n #\n"},{"id":"2739","messageId":"7v3bszbeoo.fsf@assigned-by-dhcp.cox.net","threadId":"524","inReplyTo":"20050507084549.GF23680@cip.informatik.uni-erlangen.de","subject":"Re: [PATCH]: git-merge-one-file-script use /usr/bin/env to call bash","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-05-07T08:52:55Z","receivedAt":"2005-05-07T08:52:55Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"A quick question.  Which construct in this bashism?\nNot using backtick but saying $(command)?\n\n"},{"id":"2741","messageId":"20050507090543.GG23680@cip.informatik.uni-erlangen.de","threadId":"524","inReplyTo":"7v3bszbeoo.fsf@assigned-by-dhcp.cox.net","subject":"[PATCH] Use backticks instead of $(command) to maintain /bin/sh compatibility","fromName":"Thomas Glanzmann","fromEmail":"sithglan@stud.uni-erlangen.de","sentAt":"2005-05-07T09:05:43Z","receivedAt":"2005-05-07T09:05:43Z","isPatch":true,"sender":{"key":"sithglan@stud.uni-erlangen.de","avatar":null},"body":"Hello,\n\n* Junio C Hamano <junkio@cox.net> [050507 10:54]:\n> A quick question.  Which construct in this bashism?\n> Not using backtick but saying $(command)?\n\nExactly:\n\n\t(faui04a) [~/work/git/git-solaris] git pull\n\thead => 46dd99f970d283dc0de440c06fca8f4586b70548\n\tremote => e7d3dd248f50501f98b29c917e70bddcf3ea925a\n\tbase => 74c7cfa875448c71a18d21a0cc7c973afe759fa5\n\tDocumentation/core-git.txt: unmerged (8bd893197e6e769b6e03ca1206e355214e16d56a)\n\tlocal-pull.c: unmerged (4f52bca48c390e8113b3695a53ce62e0c23278a8)\n\tlocal-pull.c: unmerged (a8af725467cde6653160511e468a1fda4e004503)\n\tlocal-pull.c: unmerged (1eec8927dbfa3af934651b25ded738d192706286)\n\tsha1_file.c: unmerged (e6ce455ae90bd430f2128f454bdb6e0575412486)\n\tsha1_file.c: unmerged (7887b6481ae5c9368a24bf053f79dbbc1f039300)\n\tsha1_file.c: unmerged (f1c1c70d784aa0587cd4c7143c3d464fd8e5ddc6)\n\tfatal: write-tree: not able to write tree\n\nThis is it:\n\t/home/cip/adm/sithglan/work/git/bin/git-SunOS/bin/git-merge-one-file-script: syntax error at line 55: `orig=$' unexpected\n\tfatal: merge program failed\n\tgit-merge-cache failed: child exit value: 1 at /home/cip/adm/sithglan/work/git/yagf/git line 1015.\n\nThe attached patch at the end of this eMail fixes it for me *without*\ntouching /bin/sh in the bang:\n\n\t(faui04a) [~/work/git/git-solaris] git pull\n\thead => 46dd99f970d283dc0de440c06fca8f4586b70548\n\tremote => e7d3dd248f50501f98b29c917e70bddcf3ea925a\n\tbase => 74c7cfa875448c71a18d21a0cc7c973afe759fa5\n\tDocumentation/core-git.txt: unmerged (8bd893197e6e769b6e03ca1206e355214e16d56a)\n\tlocal-pull.c: unmerged (4f52bca48c390e8113b3695a53ce62e0c23278a8)\n\tlocal-pull.c: unmerged (a8af725467cde6653160511e468a1fda4e004503)\n\tlocal-pull.c: unmerged (1eec8927dbfa3af934651b25ded738d192706286)\n\tsha1_file.c: unmerged (e6ce455ae90bd430f2128f454bdb6e0575412486)\n\tsha1_file.c: unmerged (7887b6481ae5c9368a24bf053f79dbbc1f039300)\n\tsha1_file.c: unmerged (f1c1c70d784aa0587cd4c7143c3d464fd8e5ddc6)\n\tfatal: write-tree: not able to write tree\n\tThreewaydiff invloved.\n\n[PATCH] Use backticks instead of $(command) to maintain /bin/sh compatibility\n\nSigned-Off-by: Thomas Glanzmann <sithglan@stud.uni-erlangen.de>\n\n--- a/git-merge-one-file-script\n+++ b/git-merge-one-file-script\n@@ -52,9 +52,9 @@\n #\n \"$1$2$3\")\n \techo \"Auto-merging $4.\"\n-\torig=$(git-unpack-file $1)\n-\tsrc1=$(git-unpack-file $2)\n-\tsrc2=$(git-unpack-file $3)\n+\torig=`git-unpack-file $1`\n+\tsrc1=`git-unpack-file $2`\n+\tsrc2=`git-unpack-file $3`\n \tmerge \"$src2\" \"$orig\" \"$src1\"\n \tret=$?\n \tif [ \"$6\" != \"$7\" ]; then\n@@ -64,7 +64,7 @@\n \t\techo \"ERROR: Leaving conflict merge in $src2.\"\n \t\texit 1\n \tfi\n-\tsha1=$(git-write-blob \"$src2\") || {\n+\tsha1=`git-write-blob \"$src2\"` || {\n \t\techo \"ERROR: Leaving conflict merge in $src2.\"\n \t}\n \texec git-update-cache --add --cacheinfo \"$6\" $sha1 \"$4\" ;;\n"},{"id":"2742","messageId":"20050507100348.GA16461@outpost.ds9a.nl","threadId":"524","inReplyTo":"20050507090543.GG23680@cip.informatik.uni-erlangen.de","subject":"Re: [PATCH] Use backticks instead of $(command) to maintain /bin/sh compatibility","fromName":"bert hubert","fromEmail":"ahu@ds9a.nl","sentAt":"2005-05-07T10:03:48Z","receivedAt":"2005-05-07T10:03:48Z","isPatch":true,"sender":{"key":"ahu@ds9a.nl","avatar":null},"body":"On Sat, May 07, 2005 at 11:05:43AM +0200, Thomas Glanzmann wrote:\n> * Junio C Hamano <junkio@cox.net> [050507 10:54]:\n> > A quick question.  Which construct in this bashism?\n> > Not using backtick but saying $(command)?\n\nYou can nest $() which is valuable, unlike backtics.\n\n-- \nhttp://www.PowerDNS.com      Open source, database driven DNS Software \nhttp://netherlabs.nl              Open and Closed source services\n"},{"id":"2743","messageId":"20050507101530.GH23680@cip.informatik.uni-erlangen.de","threadId":"524","inReplyTo":"20050507100348.GA16461@outpost.ds9a.nl","subject":"Re: [PATCH] Use backticks instead of $(command) to maintain /bin/sh compatibility","fromName":"Thomas Glanzmann","fromEmail":"sithglan@stud.uni-erlangen.de","sentAt":"2005-05-07T10:15:30Z","receivedAt":"2005-05-07T10:15:30Z","isPatch":true,"sender":{"key":"sithglan@stud.uni-erlangen.de","avatar":null},"body":"Hello,\n\n> You can nest $() which is valuable, unlike backtics.\n\nwe're aware of this. But the specific script works perfectly fine\nwithout nested simple-command redirection. So what is your point?\n\n\tThomas\n"},{"id":"2748","messageId":"20050507172429.GJ3562@admingilde.org","threadId":"524","inReplyTo":"20050507090543.GG23680@cip.informatik.uni-erlangen.de","subject":"Re: [PATCH] Use backticks instead of $(command) to maintain /bin/sh compatibility","fromName":"Martin Waitz","fromEmail":"tali@admingilde.org","sentAt":"2005-05-07T17:24:29Z","receivedAt":"2005-05-07T17:24:29Z","isPatch":true,"sender":{"key":"tali@admingilde.org","avatar":"https://gravatar.com/avatar/3f89b03eee362187effabe257898735b475673a12265c398ea9161259ae91553?d=mp&s=160"},"body":"hoi :)\n\nOn Sat, May 07, 2005 at 11:05:43AM +0200, Thomas Glanzmann wrote:\n> * Junio C Hamano <junkio@cox.net> [050507 10:54]:\n> > A quick question.  Which construct in this bashism?\n> > Not using backtick but saying $(command)?\n> \n> Exactly:\n\nhuh? which broken shell does not understand $()?\n\n-- \nMartin Waitz\n"},{"id":"2749","messageId":"7vy8aqanlh.fsf@assigned-by-dhcp.cox.net","threadId":"524","inReplyTo":"20050507101530.GH23680@cip.informatik.uni-erlangen.de","subject":"Re: [PATCH] Use backticks instead of $(command) to maintain /bin/sh compatibility","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-05-07T18:38:02Z","receivedAt":"2005-05-07T18:38:02Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":">>>>> \"TG\" == Thomas Glanzmann <sithglan@stud.uni-erlangen.de> writes:\n\nTG> Hello,\n>> You can nest $() which is valuable, unlike backtics.\n\nTG> we're aware of this. But the specific script works perfectly fine\nTG> without nested simple-command redirection. So what is your point?\n\nIf that is the case then I think the patch you posted to force\nbash is backwards.  How about changing it to use backticks?\n\n"},{"id":"2755","messageId":"118833cc0505071322480e8e09@mail.gmail.com","threadId":"524","inReplyTo":"20050507172429.GJ3562@admingilde.org","subject":"Re: [PATCH] Use backticks instead of $(command) to maintain /bin/sh compatibility","fromName":"Morten Welinder","fromEmail":"mwelinder@gmail.com","sentAt":"2005-05-07T20:22:15Z","receivedAt":"2005-05-07T20:22:15Z","isPatch":true,"sender":{"key":"mwelinder@gmail.com","avatar":null},"body":"On 5/7/05, Martin Waitz <tali@admingilde.org> wrote:\n> hoi :)\n> \n> On Sat, May 07, 2005 at 11:05:43AM +0200, Thomas Glanzmann wrote:\n> > * Junio C Hamano <junkio@cox.net> [050507 10:54]:\n> > > A quick question.  Which construct in this bashism?\n> > > Not using backtick but saying $(command)?\n> >\n> > Exactly:\n> \n> huh? which broken shell does not understand $()?\n\nSolaris' /bin/sh\n\nI thought everything we were relying on bash anyway.  It'll take it.\n\nMorten\n"},{"id":"2757","messageId":"20050507231505.GA2497@cip.informatik.uni-erlangen.de","threadId":"524","inReplyTo":"7vy8aqanlh.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Use backticks instead of $(command) to maintain /bin/sh compatibility","fromName":"Thomas Glanzmann","fromEmail":"sithglan@stud.uni-erlangen.de","sentAt":"2005-05-07T23:15:05Z","receivedAt":"2005-05-07T23:15:05Z","isPatch":true,"sender":{"key":"sithglan@stud.uni-erlangen.de","avatar":null},"body":"Hello,\n\n> If that is the case then I think the patch you posted to force\n> bash is backwards.  How about changing it to use backticks?\n\nagreed. Already did that see previous eMail.\n\n\tThomas\n"},{"id":"2758","messageId":"20050507231539.GB2497@cip.informatik.uni-erlangen.de","threadId":"524","inReplyTo":"20050507172429.GJ3562@admingilde.org","subject":"Re: [PATCH] Use backticks instead of $(command) to maintain /bin/sh compatibility","fromName":"Thomas Glanzmann","fromEmail":"sithglan@stud.uni-erlangen.de","sentAt":"2005-05-07T23:15:39Z","receivedAt":"2005-05-07T23:15:39Z","isPatch":true,"sender":{"key":"sithglan@stud.uni-erlangen.de","avatar":null},"body":"Hello Coworker,\n\n> huh? which broken shell does not understand $()?\n\n/bin/sh under Solaris 9 for example. That is where I hit it initial.\n\n\tThomas\n"},{"id":"2881","messageId":"427F77F6.1090308@zytor.com","threadId":"524","inReplyTo":"20050507231539.GB2497@cip.informatik.uni-erlangen.de","subject":"Re: [PATCH] Use backticks instead of $(command) to maintain /bin/sh compatibility","fromName":"H. Peter Anvin","fromEmail":"hpa@zytor.com","sentAt":"2005-05-09T14:47:18Z","receivedAt":"2005-05-09T14:47:18Z","isPatch":true,"sender":{"key":"hpa@zytor.com","avatar":null},"body":"Thomas Glanzmann wrote:\n> Hello Coworker,\n> \n> \n>>huh? which broken shell does not understand $()?\n> \n> \n> /bin/sh under Solaris 9 for example. That is where I hit it initial.\n> \n\nShoot Sun.\n\n$(...) is in POSIX and has been for oh, what, 15 years now?\n\n\t-hpa\n"}]}