{"thread":{"id":"28767","subject":"[PATCH] completion: fix issue with process substitution not working on Git for Windows","startedAt":"2011-10-25T18:01:35Z","lastAt":"2011-10-27T10:40:43Z","messageCount":10,"participants":["Stefan Naewe","Johannes Sixt","Stefan Näwe","Junio C Hamano","SZEDER Gábor","Jonas Berlin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"178288","messageId":"1319565695-5976-1-git-send-email-stefan.naewe@gmail.com","threadId":"28767","inReplyTo":null,"subject":"[PATCH] completion: fix issue with process substitution not working on Git for Windows","fromName":"Stefan Naewe","fromEmail":"stefan.naewe@gmail.com","sentAt":"2011-10-25T18:01:35Z","receivedAt":"2011-10-25T18:01:35Z","isPatch":true,"sender":{"key":"stefan.naewe@gmail.com","avatar":"https://avatars.githubusercontent.com/u/4468?v=4"},"body":"Git for Windows comes with a bash that doesn't support process substitution.\nIt issues the following error when using git-completion.bash with\nGIT_PS1_SHOWUPSTREAM set:\n\n$ export GIT_PS1_SHOWUPSTREAM=1\nsh.exe\": cannot make pipe for process substitution: Function not implemented\nsh.exe\": cannot make pipe for process substitution: Function not implemented\nsh.exe\": <(git config -z --get-regexp '^(svn-remote\\..*\\.url|bash\\.showupstream)$' 2>/dev/null | tr '\\0\\n' '\\n '): ambiguous redirect\n\nReplace the process substitution with a simple \"echo $var | while...\".\n\nSigned-off-by: Stefan Naewe <stefan.naewe@gmail.com>\n---\n contrib/completion/git-completion.bash |    4 +++-\n 1 files changed, 3 insertions(+), 1 deletions(-)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex 8648a36..926db80 100755\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -110,6 +110,8 @@ __git_ps1_show_upstream ()\n \tlocal upstream=git legacy=\"\" verbose=\"\"\n \n \t# get some config options from git-config\n+\toutput=\"$(git config -z --get-regexp '^(svn-remote\\..*\\.url|bash\\.showupstream)$' 2>/dev/null | tr '\\0\\n' '\\n ')\"\n+\techo \"$output\" | \\\n \twhile read key value; do\n \t\tcase \"$key\" in\n \t\tbash.showupstream)\n@@ -125,7 +127,7 @@ __git_ps1_show_upstream ()\n \t\t\tupstream=svn+git # default upstream is SVN if available, else git\n \t\t\t;;\n \t\tesac\n-\tdone < <(git config -z --get-regexp '^(svn-remote\\..*\\.url|bash\\.showupstream)$' 2>/dev/null | tr '\\0\\n' '\\n ')\n+\tdone\n \n \t# parse configuration values\n \tfor option in ${GIT_PS1_SHOWUPSTREAM}; do\n-- \n1.7.7.1\n"},{"id":"178296","messageId":"4EA71E8C.8010704@kdbg.org","threadId":"28767","inReplyTo":"1319565695-5976-1-git-send-email-stefan.naewe@gmail.com","subject":"Re: [PATCH] completion: fix issue with process substitution not working on Git for Windows","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2011-10-25T20:39:40Z","receivedAt":"2011-10-25T20:39:40Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 25.10.2011 20:01, schrieb Stefan Naewe:\n> Git for Windows comes with a bash that doesn't support process substitution.\n> It issues the following error when using git-completion.bash with\n> GIT_PS1_SHOWUPSTREAM set:\n> \n> $ export GIT_PS1_SHOWUPSTREAM=1\n> sh.exe\": cannot make pipe for process substitution: Function not implemented\n> sh.exe\": cannot make pipe for process substitution: Function not implemented\n> sh.exe\": <(git config -z --get-regexp '^(svn-remote\\..*\\.url|bash\\.showupstream)$' 2>/dev/null | tr '\\0\\n' '\\n '): ambiguous redirect\n> \n> Replace the process substitution with a simple \"echo $var | while...\".\n> \n> Signed-off-by: Stefan Naewe <stefan.naewe@gmail.com>\n> ---\n>  contrib/completion/git-completion.bash |    4 +++-\n>  1 files changed, 3 insertions(+), 1 deletions(-)\n> \n> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\n> index 8648a36..926db80 100755\n> --- a/contrib/completion/git-completion.bash\n> +++ b/contrib/completion/git-completion.bash\n> @@ -110,6 +110,8 @@ __git_ps1_show_upstream ()\n>  \tlocal upstream=git legacy=\"\" verbose=\"\"\n>  \n>  \t# get some config options from git-config\n> +\toutput=\"$(git config -z --get-regexp '^(svn-remote\\..*\\.url|bash\\.showupstream)$' 2>/dev/null | tr '\\0\\n' '\\n ')\"\n> +\techo \"$output\" | \\\n>  \twhile read key value; do\n>  \t\tcase \"$key\" in\n>  \t\tbash.showupstream)\n> @@ -125,7 +127,7 @@ __git_ps1_show_upstream ()\n>  \t\t\tupstream=svn+git # default upstream is SVN if available, else git\n>  \t\t\t;;\n>  \t\tesac\n> -\tdone < <(git config -z --get-regexp '^(svn-remote\\..*\\.url|bash\\.showupstream)$' 2>/dev/null | tr '\\0\\n' '\\n ')\n> +\tdone\n>  \n>  \t# parse configuration values\n>  \tfor option in ${GIT_PS1_SHOWUPSTREAM}; do\n\nAre you sure that the result still works as intended? The while loop\nsets a few variables. When you place it in a pipe, the loop runs in a\nsubshell, and subsequent code will not see the modified values. Unless\nbash knows how to optimize away the subshell, that is.\n\nOTOH, when you use while ...; do ...; done < <(...), the while loop is\nnot in a subshell.\n\nAn alternative is to use:  while ...; do ...; done <<< \"$output\"\n\nBTW, you don't need to protect the end-of-line with a backslash if the\nline ends with the pipe symbol.\n\n-- Hannes\n"},{"id":"178306","messageId":"CAJzBP5QYKOf4OUMm4vfVay=b7F_fHJf40JgzDAZZa7p0fxLpyA@mail.gmail.com","threadId":"28767","inReplyTo":"4EA71E8C.8010704@kdbg.org","subject":"Re: [PATCH] completion: fix issue with process substitution not working on Git for Windows","fromName":"Stefan Näwe","fromEmail":"stefan.naewe@gmail.com","sentAt":"2011-10-26T06:52:03Z","receivedAt":"2011-10-26T06:52:03Z","isPatch":true,"sender":{"key":"stefan.naewe@gmail.com","avatar":"https://avatars.githubusercontent.com/u/4468?v=4"},"body":"Am 25. Oktober 2011 22:39 schrieb Johannes Sixt <j6t@kdbg.org>:\n> Am 25.10.2011 20:01, schrieb Stefan Naewe:\n>> Git for Windows comes with a bash that doesn't support process substitution.\n>> It issues the following error when using git-completion.bash with\n>> GIT_PS1_SHOWUPSTREAM set:\n>>\n>> $ export GIT_PS1_SHOWUPSTREAM=1\n>> sh.exe\": cannot make pipe for process substitution: Function not implemented\n>> sh.exe\": cannot make pipe for process substitution: Function not implemented\n>> sh.exe\": <(git config -z --get-regexp '^(svn-remote\\..*\\.url|bash\\.showupstream)$' 2>/dev/null | tr '\\0\\n' '\\n '): ambiguous redirect\n>>\n>> Replace the process substitution with a simple \"echo $var | while...\".\n>>\n>> Signed-off-by: Stefan Naewe <stefan.naewe@gmail.com>\n>> ---\n>>  contrib/completion/git-completion.bash |    4 +++-\n>>  1 files changed, 3 insertions(+), 1 deletions(-)\n>>\n>> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\n>> index 8648a36..926db80 100755\n>> --- a/contrib/completion/git-completion.bash\n>> +++ b/contrib/completion/git-completion.bash\n>> @@ -110,6 +110,8 @@ __git_ps1_show_upstream ()\n>>       local upstream=git legacy=\"\" verbose=\"\"\n>>\n>>       # get some config options from git-config\n>> +     output=\"$(git config -z --get-regexp '^(svn-remote\\..*\\.url|bash\\.showupstream)$' 2>/dev/null | tr '\\0\\n' '\\n ')\"\n>> +     echo \"$output\" | \\\n>>       while read key value; do\n>>               case \"$key\" in\n>>               bash.showupstream)\n>> @@ -125,7 +127,7 @@ __git_ps1_show_upstream ()\n>>                       upstream=svn+git # default upstream is SVN if available, else git\n>>                       ;;\n>>               esac\n>> -     done < <(git config -z --get-regexp '^(svn-remote\\..*\\.url|bash\\.showupstream)$' 2>/dev/null | tr '\\0\\n' '\\n ')\n>> +     done\n>>\n>>       # parse configuration values\n>>       for option in ${GIT_PS1_SHOWUPSTREAM}; do\n>\n> Are you sure that the result still works as intended? The while loop\n> sets a few variables. When you place it in a pipe, the loop runs in a\n> subshell, and subsequent code will not see the modified values. Unless\n> bash knows how to optimize away the subshell, that is.\n\nI doesn't work in the 'git svn' case, I guess.\n\n> OTOH, when you use while ...; do ...; done < <(...), the while loop is\n> not in a subshell.\n>\n> An alternative is to use:  while ...; do ...; done <<< \"$output\"\n\nI'll try that.\n\n> BTW, you don't need to protect the end-of-line with a backslash if the\n> line ends with the pipe symbol.\n\nOK. Will do.\n\n> -- Hannes\n\nThanks,\n  Stefan\n-- \n----------------------------------------------------------------\npython -c \"print '73746566616e2e6e6165776540676d61696c2e636f6d'.decode('hex')\"\n"},{"id":"178330","messageId":"1319656389-9515-1-git-send-email-stefan.naewe@gmail.com","threadId":"28767","inReplyTo":"CAJzBP5QYKOf4OUMm4vfVay=b7F_fHJf40JgzDAZZa7p0fxLpyA@mail.gmail.com","subject":"[PATCH v2] completion: fix issue with process substitution not working on Git for Windows","fromName":"Stefan Naewe","fromEmail":"stefan.naewe@gmail.com","sentAt":"2011-10-26T19:13:09Z","receivedAt":"2011-10-26T19:13:09Z","isPatch":true,"sender":{"key":"stefan.naewe@gmail.com","avatar":"https://avatars.githubusercontent.com/u/4468?v=4"},"body":"Git for Windows comes with a bash that doesn't support process substitution.\nIt issues the following error when using git-completion.bash with\nGIT_PS1_SHOWUPSTREAM set:\n\n$ export GIT_PS1_SHOWUPSTREAM=1\nsh.exe\": cannot make pipe for process substitution: Function not implemented\nsh.exe\": cannot make pipe for process substitution: Function not implemented\nsh.exe\": <(git config -z --get-regexp '^(svn-remote\\..*\\.url|bash\\.showupstream)$' 2>/dev/null | tr '\\0\\n' '\\n '): ambiguous redirect\n\nReplace the process substitution with a 'here string'.\n\nSigned-off-by: Stefan Naewe <stefan.naewe@gmail.com>\n---\n contrib/completion/git-completion.bash |    3 ++-\n 1 files changed, 2 insertions(+), 1 deletions(-)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex 8648a36..0b3d47e 100755\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -110,6 +110,7 @@ __git_ps1_show_upstream ()\n \tlocal upstream=git legacy=\"\" verbose=\"\"\n \n \t# get some config options from git-config\n+\toutput=\"$(git config -z --get-regexp '^(svn-remote\\..*\\.url|bash\\.showupstream)$' 2>/dev/null | tr '\\0\\n' '\\n ')\"\n \twhile read key value; do\n \t\tcase \"$key\" in\n \t\tbash.showupstream)\n@@ -125,7 +126,7 @@ __git_ps1_show_upstream ()\n \t\t\tupstream=svn+git # default upstream is SVN if available, else git\n \t\t\t;;\n \t\tesac\n-\tdone < <(git config -z --get-regexp '^(svn-remote\\..*\\.url|bash\\.showupstream)$' 2>/dev/null | tr '\\0\\n' '\\n ')\n+\tdone <<< \"$output\"\n \n \t# parse configuration values\n \tfor option in ${GIT_PS1_SHOWUPSTREAM}; do\n-- \n1.7.7.1\n"},{"id":"178334","messageId":"7vvcrb1py0.fsf@alter.siamese.dyndns.org","threadId":"28767","inReplyTo":"1319656389-9515-1-git-send-email-stefan.naewe@gmail.com","subject":"Re: [PATCH v2] completion: fix issue with process substitution not working on Git for Windows","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-10-26T20:02:47Z","receivedAt":"2011-10-26T20:02:47Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Stefan Naewe <stefan.naewe@gmail.com> writes:\n\n> Git for Windows comes with a bash that doesn't support process substitution.\n> It issues the following error when using git-completion.bash with\n> GIT_PS1_SHOWUPSTREAM set:\n>\n> $ export GIT_PS1_SHOWUPSTREAM=1\n> sh.exe\": cannot make pipe for process substitution: Function not implemented\n> sh.exe\": cannot make pipe for process substitution: Function not implemented\n> sh.exe\": <(git config -z --get-regexp '^(svn-remote\\..*\\.url|bash\\.showupstream)$' 2>/dev/null | tr '\\0\\n' '\\n '): ambiguous redirect\n>\n> Replace the process substitution with a 'here string'.\n>\n> Signed-off-by: Stefan Naewe <stefan.naewe@gmail.com>\n\nYuck, but I honestly shouldn't care about the yuckiness as this script is\ninherently intimately dependent on bash anyway ;-).\n\n>  contrib/completion/git-completion.bash |    3 ++-\n>  1 files changed, 2 insertions(+), 1 deletions(-)\n>\n> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\n> index 8648a36..0b3d47e 100755\n> --- a/contrib/completion/git-completion.bash\n> +++ b/contrib/completion/git-completion.bash\n> @@ -110,6 +110,7 @@ __git_ps1_show_upstream ()\n>  \tlocal upstream=git legacy=\"\" verbose=\"\"\n>  \n>  \t# get some config options from git-config\n> +\toutput=\"$(git config -z --get-regexp '^(svn-remote\\..*\\.url|bash\\.showupstream)$' 2>/dev/null | tr '\\0\\n' '\\n ')\"\n>  \twhile read key value; do\n>  \t\tcase \"$key\" in\n>  \t\tbash.showupstream)\n> @@ -125,7 +126,7 @@ __git_ps1_show_upstream ()\n>  \t\t\tupstream=svn+git # default upstream is SVN if available, else git\n>  \t\t\t;;\n>  \t\tesac\n> -\tdone < <(git config -z --get-regexp '^(svn-remote\\..*\\.url|bash\\.showupstream)$' 2>/dev/null | tr '\\0\\n' '\\n ')\n> +\tdone <<< \"$output\"\n>  \n>  \t# parse configuration values\n>  \tfor option in ${GIT_PS1_SHOWUPSTREAM}; do\n"},{"id":"178337","messageId":"7vipnb1myv.fsf@alter.siamese.dyndns.org","threadId":"28767","inReplyTo":"1319656389-9515-1-git-send-email-stefan.naewe@gmail.com","subject":"Re: [PATCH v2] completion: fix issue with process substitution not working on Git for Windows","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-10-26T21:07:04Z","receivedAt":"2011-10-26T21:07:04Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Stefan Naewe <stefan.naewe@gmail.com> writes:\n\n> $ export GIT_PS1_SHOWUPSTREAM=1\n> sh.exe\": cannot make pipe for process substitution: Function not implemented\n> sh.exe\": cannot make pipe for process substitution: Function not implemented\n> sh.exe\": <(git config -z --get-regexp '^(svn-remote\\..*\\.url|bash\\.showupstream)$' 2>/dev/null | tr '\\0\\n' '\\n '): ambiguous redirect\n\nAre these the exact strings you want to have in the commit log message? I\nam particularly wondering about the dq after (but not around) 'sh.exe'.\n"},{"id":"178341","messageId":"CAJzBP5TTR8VCidGmWT4a4Gk91=D5rgXMKoSpyuSFe8tOcLwRNA@mail.gmail.com","threadId":"28767","inReplyTo":"7vipnb1myv.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH v2] completion: fix issue with process substitution not working on Git for Windows","fromName":"Stefan Näwe","fromEmail":"stefan.naewe@gmail.com","sentAt":"2011-10-27T06:26:37Z","receivedAt":"2011-10-27T06:26:37Z","isPatch":true,"sender":{"key":"stefan.naewe@gmail.com","avatar":"https://avatars.githubusercontent.com/u/4468?v=4"},"body":"Am 26. Oktober 2011 23:07 schrieb Junio C Hamano <gitster@pobox.com>:\n> Stefan Naewe <stefan.naewe@gmail.com> writes:\n>\n>> $ export GIT_PS1_SHOWUPSTREAM=1\n>> sh.exe\": cannot make pipe for process substitution: Function not implemented\n>> sh.exe\": cannot make pipe for process substitution: Function not implemented\n>> sh.exe\": <(git config -z --get-regexp '^(svn-remote\\..*\\.url|bash\\.showupstream)$' 2>/dev/null | tr '\\0\\n' '\\n '): ambiguous redirect\n>\n> Are these the exact strings you want to have in the commit log message? I\n> am particularly wondering about the dq after (but not around) 'sh.exe'.\n\nYes. That's exactly what I get.\n\nStefan\n-- \n----------------------------------------------------------------\npython -c \"print '73746566616e2e6e6165776540676d61696c2e636f6d'.decode('hex')\"\n"},{"id":"178348","messageId":"20111027090530.GA23424@goldbirke","threadId":"28767","inReplyTo":"1319656389-9515-1-git-send-email-stefan.naewe@gmail.com","subject":"Re: [PATCH v2] completion: fix issue with process substitution not working on Git for Windows","fromName":"SZEDER Gábor","fromEmail":"szeder@ira.uka.de","sentAt":"2011-10-27T09:05:30Z","receivedAt":"2011-10-27T09:05:30Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"On Wed, Oct 26, 2011 at 09:13:09PM +0200, Stefan Naewe wrote:\n> Git for Windows comes with a bash that doesn't support process substitution.\n> It issues the following error when using git-completion.bash with\n> GIT_PS1_SHOWUPSTREAM set:\n> \n> $ export GIT_PS1_SHOWUPSTREAM=1\n> sh.exe\": cannot make pipe for process substitution: Function not implemented\n> sh.exe\": cannot make pipe for process substitution: Function not implemented\n> sh.exe\": <(git config -z --get-regexp '^(svn-remote\\..*\\.url|bash\\.showupstream)$' 2>/dev/null | tr '\\0\\n' '\\n '): ambiguous redirect\n> \n> Replace the process substitution with a 'here string'.\n> \n> Signed-off-by: Stefan Naewe <stefan.naewe@gmail.com>\n> ---\n>  contrib/completion/git-completion.bash |    3 ++-\n>  1 files changed, 2 insertions(+), 1 deletions(-)\n> \n> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\n> index 8648a36..0b3d47e 100755\n> --- a/contrib/completion/git-completion.bash\n> +++ b/contrib/completion/git-completion.bash\n> @@ -110,6 +110,7 @@ __git_ps1_show_upstream ()\n>  \tlocal upstream=git legacy=\"\" verbose=\"\"\n>  \n>  \t# get some config options from git-config\n> +\toutput=\"$(git config -z --get-regexp '^(svn-remote\\..*\\.url|bash\\.showupstream)$' 2>/dev/null | tr '\\0\\n' '\\n ')\"\n>  \twhile read key value; do\n>  \t\tcase \"$key\" in\n>  \t\tbash.showupstream)\n> @@ -125,7 +126,7 @@ __git_ps1_show_upstream ()\n>  \t\t\tupstream=svn+git # default upstream is SVN if available, else git\n>  \t\t\t;;\n>  \t\tesac\n> -\tdone < <(git config -z --get-regexp '^(svn-remote\\..*\\.url|bash\\.showupstream)$' 2>/dev/null | tr '\\0\\n' '\\n ')\n> +\tdone <<< \"$output\"\n\nThe $output variable is not declared as local and therefore it leaks\ninto the environment.  But instead of declaring it local, why not\neliminate it altogether, and use the \"$(git config ....)\" command\nsubstitution as here string?\n\n\nGábor\n"},{"id":"178349","messageId":"20111027132754.1503b98b@outerspace.dyndns.org","threadId":"28767","inReplyTo":"20111027090530.GA23424@goldbirke","subject":"Re: [PATCH v2] completion: fix issue with process substitution not working on Git for Windows","fromName":"Jonas Berlin","fromEmail":"xkr47@outerspace.dyndns.org","sentAt":"2011-10-27T10:27:54Z","receivedAt":"2011-10-27T10:27:54Z","isPatch":true,"sender":{"key":"xkr47@outerspace.dyndns.org","avatar":null},"body":"On Thu, 27 Oct 2011 11:05:30 +0200\nSZEDER Gábor <szeder@ira.uka.de> wrote:\n\n> On Wed, Oct 26, 2011 at 09:13:09PM +0200, Stefan Naewe wrote:\n> > Git for Windows comes with a bash that doesn't support process substitution.\n> > It issues the following error when using git-completion.bash with\n> > GIT_PS1_SHOWUPSTREAM set:\n> > \n> > $ export GIT_PS1_SHOWUPSTREAM=1\n> > sh.exe\": cannot make pipe for process substitution: Function not implemented\n> > sh.exe\": cannot make pipe for process substitution: Function not implemented\n> > sh.exe\": <(git config -z --get-regexp '^(svn-remote\\..*\\.url|bash\\.showupstream)$' 2>/dev/null | tr '\\0\\n' '\\n '): ambiguous redirect\n> > \n> > Replace the process substitution with a 'here string'.\n> > \n> > Signed-off-by: Stefan Naewe <stefan.naewe@gmail.com>\n> > ---\n> >  contrib/completion/git-completion.bash |    3 ++-\n> >  1 files changed, 2 insertions(+), 1 deletions(-)\n> > \n> > diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\n> > index 8648a36..0b3d47e 100755\n> > --- a/contrib/completion/git-completion.bash\n> > +++ b/contrib/completion/git-completion.bash\n> > @@ -110,6 +110,7 @@ __git_ps1_show_upstream ()\n> >  \tlocal upstream=git legacy=\"\" verbose=\"\"\n> >  \n> >  \t# get some config options from git-config\n> > +\toutput=\"$(git config -z --get-regexp '^(svn-remote\\..*\\.url|bash\\.showupstream)$' 2>/dev/null | tr '\\0\\n' '\\n ')\"\n> >  \twhile read key value; do\n> >  \t\tcase \"$key\" in\n> >  \t\tbash.showupstream)\n> > @@ -125,7 +126,7 @@ __git_ps1_show_upstream ()\n> >  \t\t\tupstream=svn+git # default upstream is SVN if available, else git\n> >  \t\t\t;;\n> >  \t\tesac\n> > -\tdone < <(git config -z --get-regexp '^(svn-remote\\..*\\.url|bash\\.showupstream)$' 2>/dev/null | tr '\\0\\n' '\\n ')\n> > +\tdone <<< \"$output\"\n> \n> The $output variable is not declared as local and therefore it leaks\n> into the environment.  But instead of declaring it local, why not\n> eliminate it altogether, and use the \"$(git config ....)\" command\n> substitution as here string?\n\nWouldn't this work:\n\n\tgit config -z --get-regexp '^(svn-remote\\..*\\.url|bash\\.showupstream)$' 2>/dev/null | tr '\\0\\n' '\\n ' | \\\n\twhile read key value; do\n\t\t...\n\tdone\n\n- xkr47\n"},{"id":"178350","messageId":"20111027134043.56519ca4@outerspace.dyndns.org","threadId":"28767","inReplyTo":"20111027132754.1503b98b@outerspace.dyndns.org","subject":"Re: [PATCH v2] completion: fix issue with process substitution not working on Git for Windows","fromName":"Jonas Berlin","fromEmail":"jonas.berlin@outerspace.dyndns.org","sentAt":"2011-10-27T10:40:43Z","receivedAt":"2011-10-27T10:40:43Z","isPatch":true,"sender":{"key":"jonas.berlin@outerspace.dyndns.org","avatar":null},"body":"On Thu, 27 Oct 2011 13:27:54 +0300\nJonas Berlin <xkr47@outerspace.dyndns.org> wrote:\n\n> On Thu, 27 Oct 2011 11:05:30 +0200\n> SZEDER Gábor <szeder@ira.uka.de> wrote:\n> > The $output variable is not declared as local and therefore it leaks\n> > into the environment.  But instead of declaring it local, why not\n> > eliminate it altogether, and use the \"$(git config ....)\" command\n> > substitution as here string?\n> \n> Wouldn't this work:\n> \n> \tgit config -z --get-regexp '^(svn-remote\\..*\\.url|bash\\.showupstream)$' 2>/dev/null | tr '\\0\\n' '\\n ' | \\\n> \twhile read key value; do\n> \t\t...\n> \tdone\n\nSorry, please disregard, I didn't notice it was already dismissed in v1 of the PATCH..\n\n- xkr47\n"}]}