{"thread":{"id":"49716","subject":"[PATCH 0/1] DiffHighlight.pm: Use correct /dev/null for UNIX and Windows","startedAt":"2018-10-30T18:26:38Z","lastAt":"2019-05-12T20:24:53Z","messageCount":18,"participants":["Chris. Webster via GitGitGadget","chris via GitGitGadget","Jeff King","Junio C Hamano","Chris Webster","Johannes Schindelin","Git Gadget","Philip Oakley"],"isPatch":true,"patchVersion":1,"patchTotal":1},"messages":[{"id":"361998","messageId":"pull.59.git.gitgitgadget@gmail.com","threadId":"49716","inReplyTo":null,"subject":"[PATCH 0/1] DiffHighlight.pm: Use correct /dev/null for UNIX and Windows","fromName":"Chris. Webster via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2018-10-30T18:26:34Z","receivedAt":"2018-10-30T18:26:38Z","isPatch":true,"sender":{"key":"name:Chris. Webster","avatar":null},"body":"Use File::Spec->devnull() for output redirection to avoid messages when\nWindows version of Perl is first in path. The message 'The system cannot\nfind the path specified.' is displayed each time git is run to get colors.\n\nchris (1):\n  Use correct /dev/null for UNIX and Windows\n\n contrib/diff-highlight/DiffHighlight.pm | 7 ++++++-\n 1 file changed, 6 insertions(+), 1 deletion(-)\n\n\nbase-commit: c670b1f876521c9f7cd40184bf7ed05aad843433\nPublished-As: https://github.com/gitgitgadget/git/releases/tags/pr-59%2Fwebstech%2Fmaster-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-59/webstech/master-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/59\n-- \ngitgitgadget\n"},{"id":"361999","messageId":"8159cbd1b8025f33fb9d0e254db1a3c2a066f853.1540923993.git.gitgitgadget@gmail.com","threadId":"49716","inReplyTo":"pull.59.git.gitgitgadget@gmail.com","subject":"[PATCH 1/1] Use correct /dev/null for UNIX and Windows","fromName":"chris via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2018-10-30T18:26:36Z","receivedAt":"2018-10-30T18:26:39Z","isPatch":true,"sender":{"key":"jugg@hotmail.com","avatar":null},"body":"From: chris <chris@webstech.net>\n\nUse File::Spec->devnull() for output redirection to avoid messages\nwhen Windows version of Perl is first in path.  The message 'The\nsystem cannot find the path specified.' is displayed each time git is\nrun to get colors.\n\nSigned-off-by: Chris. Webster <chris@webstech.net>\n---\n contrib/diff-highlight/DiffHighlight.pm | 7 ++++++-\n 1 file changed, 6 insertions(+), 1 deletion(-)\n\ndiff --git a/contrib/diff-highlight/DiffHighlight.pm b/contrib/diff-highlight/DiffHighlight.pm\nindex 536754583..7440aa1c4 100644\n--- a/contrib/diff-highlight/DiffHighlight.pm\n+++ b/contrib/diff-highlight/DiffHighlight.pm\n@@ -4,6 +4,11 @@ use 5.008;\n use warnings FATAL => 'all';\n use strict;\n \n+# Use the correct value for both UNIX and Windows (/dev/null vs nul)\n+use File::Spec;\n+\n+my $NULL = File::Spec->devnull();\n+\n # Highlight by reversing foreground and background. You could do\n # other things like bold or underline if you prefer.\n my @OLD_HIGHLIGHT = (\n@@ -134,7 +139,7 @@ sub highlight_stdin {\n # fallback, which means we will work even if git can't be run.\n sub color_config {\n \tmy ($key, $default) = @_;\n-\tmy $s = `git config --get-color $key 2>/dev/null`;\n+\tmy $s = `git config --get-color $key 2>$NULL`;\n \treturn length($s) ? $s : $default;\n }\n \n-- \ngitgitgadget\n"},{"id":"362056","messageId":"20181031035618.GA31247@sigill.intra.peff.net","threadId":"49716","inReplyTo":"8159cbd1b8025f33fb9d0e254db1a3c2a066f853.1540923993.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 1/1] Use correct /dev/null for UNIX and Windows","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2018-10-31T03:56:18Z","receivedAt":"2018-10-31T03:59:22Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Oct 30, 2018 at 11:26:36AM -0700, chris via GitGitGadget wrote:\n\n> From: chris <chris@webstech.net>\n\nYou might want to adjust your user.name. :)\n\n> Use File::Spec->devnull() for output redirection to avoid messages\n> when Windows version of Perl is first in path.  The message 'The\n> system cannot find the path specified.' is displayed each time git is\n> run to get colors.\n\nThanks, makes sense, and the patch looks good to me.\n\n-Peff\n"},{"id":"362065","messageId":"xmqqy3aewwky.fsf@gitster-ct.c.googlers.com","threadId":"49716","inReplyTo":"20181031035618.GA31247@sigill.intra.peff.net","subject":"Re: [PATCH 1/1] Use correct /dev/null for UNIX and Windows","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-10-31T04:48:13Z","receivedAt":"2018-10-31T04:48:21Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> On Tue, Oct 30, 2018 at 11:26:36AM -0700, chris via GitGitGadget wrote:\n>\n>> From: chris <chris@webstech.net>\n>\n> You might want to adjust your user.name. :)\n\nYes, absolutely.  We'd want to see that the From: line and one of\nthe Signed-off-by: lines are idential.\n\n>> Use File::Spec->devnull() for output redirection to avoid messages\n>> when Windows version of Perl is first in path.  The message 'The\n>> system cannot find the path specified.' is displayed each time git is\n>> run to get colors.\n>\n> Thanks, makes sense, and the patch looks good to me.\n\nYup, and we already use File::Spec everywhere anyway, so this is not\na new dependency, either.  Which is very good.\n"},{"id":"362066","messageId":"xmqqsh0mwwah.fsf@gitster-ct.c.googlers.com","threadId":"49716","inReplyTo":"8159cbd1b8025f33fb9d0e254db1a3c2a066f853.1540923993.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 1/1] Use correct /dev/null for UNIX and Windows","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-10-31T04:54:30Z","receivedAt":"2018-10-31T04:54:35Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"chris via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n> From: chris <chris@webstech.net>\n>\n> Use File::Spec->devnull() for output redirection to avoid messages\n> when Windows version of Perl is first in path.  The message 'The\n\nDscho, \"Windows version of Perl is first in path\" somehow feels\ncontradicting with what one of the topics I saw from you were trying\nto enforce (or, at least, \"set as the supported configuration\").\n\nI am guessing that the Perl you are building and shipping with Git\nfor Windows would yield what the shell that ends up running the\nscriptlet `git config --get-color $key` prefers when asked for\nFile::Spec->devnull(), and nothing will break with this patch even\nif that is \"/dev/null\", but I thought I'd double check.\n\nThanks.\n\n> system cannot find the path specified.' is displayed each time git is\n> run to get colors.\n>\n> Signed-off-by: Chris. Webster <chris@webstech.net>\n> ---\n>  contrib/diff-highlight/DiffHighlight.pm | 7 ++++++-\n>  1 file changed, 6 insertions(+), 1 deletion(-)\n>\n> diff --git a/contrib/diff-highlight/DiffHighlight.pm b/contrib/diff-highlight/DiffHighlight.pm\n> index 536754583..7440aa1c4 100644\n> --- a/contrib/diff-highlight/DiffHighlight.pm\n> +++ b/contrib/diff-highlight/DiffHighlight.pm\n> @@ -4,6 +4,11 @@ use 5.008;\n>  use warnings FATAL => 'all';\n>  use strict;\n>  \n> +# Use the correct value for both UNIX and Windows (/dev/null vs nul)\n> +use File::Spec;\n> +\n> +my $NULL = File::Spec->devnull();\n> +\n>  # Highlight by reversing foreground and background. You could do\n>  # other things like bold or underline if you prefer.\n>  my @OLD_HIGHLIGHT = (\n> @@ -134,7 +139,7 @@ sub highlight_stdin {\n>  # fallback, which means we will work even if git can't be run.\n>  sub color_config {\n>  \tmy ($key, $default) = @_;\n> -\tmy $s = `git config --get-color $key 2>/dev/null`;\n> +\tmy $s = `git config --get-color $key 2>$NULL`;\n>  \treturn length($s) ? $s : $default;\n>  }\n"},{"id":"362068","messageId":"xmqqo9bawvpf.fsf@gitster-ct.c.googlers.com","threadId":"49716","inReplyTo":"8159cbd1b8025f33fb9d0e254db1a3c2a066f853.1540923993.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 1/1] Use correct /dev/null for UNIX and Windows","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-10-31T05:07:08Z","receivedAt":"2018-10-31T05:07:13Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"> Subject: Re: [PATCH 1/1] Use correct /dev/null for UNIX and Windows\n\nAs this is only about contrib/diff-highlight, please make it clear\nthat it is the area the patch affects on its title, i.e.\n\n\tSubject: diff-highlight: use File::Spec->devnull(), not /dev/null\n\nor something like that.\n\n> From: chris <chris@webstech.net>\n\nPlease make this line read like\n\n\tFrom: Chris Webster <chris@webstech.net>\n\ni.e. the author should be the person who is signing off that patch.\n\n> Use File::Spec->devnull() for output redirection to avoid messages\n> when Windows version of Perl is first in path.  The message 'The\n> system cannot find the path specified.' is displayed each time git is\n> run to get colors.\n>\n> Signed-off-by: Chris. Webster <chris@webstech.net>\n> ---\n>  contrib/diff-highlight/DiffHighlight.pm | 7 ++++++-\n>  1 file changed, 6 insertions(+), 1 deletion(-)\n\nThere are a handful more instances of /dev/null found if you do\n\n\t$ git grep /dev/null -- \\*.pl \\*.pm\n\nThe one in perl/Git.pm must be shared by scripts written in Perl, so\nit may be worth giving the same tweak to it, like this patch does to\nthe highlight script.\n\n> diff --git a/contrib/diff-highlight/DiffHighlight.pm b/contrib/diff-highlight/DiffHighlight.pm\n> index 536754583..7440aa1c4 100644\n> --- a/contrib/diff-highlight/DiffHighlight.pm\n> +++ b/contrib/diff-highlight/DiffHighlight.pm\n> @@ -4,6 +4,11 @@ use 5.008;\n>  use warnings FATAL => 'all';\n>  use strict;\n>  \n> +# Use the correct value for both UNIX and Windows (/dev/null vs nul)\n> +use File::Spec;\n> +\n> +my $NULL = File::Spec->devnull();\n> +\n>  # Highlight by reversing foreground and background. You could do\n>  # other things like bold or underline if you prefer.\n>  my @OLD_HIGHLIGHT = (\n> @@ -134,7 +139,7 @@ sub highlight_stdin {\n>  # fallback, which means we will work even if git can't be run.\n>  sub color_config {\n>  \tmy ($key, $default) = @_;\n> -\tmy $s = `git config --get-color $key 2>/dev/null`;\n> +\tmy $s = `git config --get-color $key 2>$NULL`;\n>  \treturn length($s) ? $s : $default;\n>  }\n"},{"id":"362071","messageId":"CAGT1KpWC_+=u7fCzQJsU8d_gSQzE5rsx46cTXogvaRPHZ1iiHw@mail.gmail.com","threadId":"49716","inReplyTo":"CAGT1KpWoGD0xgTrC-+X1WqY_M=2arYbs4ZX6Nnj-zHK6mgu+nw@mail.gmail.com","subject":"Re: [PATCH 1/1] Use correct /dev/null for UNIX and Windows","fromName":"Chris Webster","fromEmail":"chris@webstech.net","sentAt":"2018-10-31T05:41:15Z","receivedAt":"2018-10-31T05:41:02Z","isPatch":true,"sender":{"key":"chris@webstech.net","avatar":"https://avatars.githubusercontent.com/u/7956947?v=4"},"body":"Resending in text mode.\n\nOn Tue, Oct 30, 2018 at 10:20 PM Chris Webster <chris@webstech.net> wrote:\n>\n> On Tue, Oct 30, 2018 at 9:54 PM Junio C Hamano <gitster@pobox.com> wrote:\n>>\n>> \"chris via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n>>\n>> > From: chris <chris@webstech.net>\n>> >\n>> > Use File::Spec->devnull() for output redirection to avoid messages\n>> > when Windows version of Perl is first in path.  The message 'The\n>>\n>> Dscho, \"Windows version of Perl is first in path\" somehow feels\n>> contradicting with what one of the topics I saw from you were trying\n>> to enforce (or, at least, \"set as the supported configuration\").\n>>\n>> I am guessing that the Perl you are building and shipping with Git\n>> for Windows would yield what the shell that ends up running the\n>> scriptlet `git config --get-color $key` prefers when asked for\n>> File::Spec->devnull(), and nothing will break with this patch even\n>> if that is \"/dev/null\", but I thought I'd double check.\n>>\n>> Thanks.\n>>\nThis problem originally showed up in the\nhttps://github.com/so-fancy/diff-so-fancy project, which has a copy of\nDiffHighlight.pm.   That project allows diffsofancy (perl) to be run\nfrom the command line without requiring the bash environment ((well ,\nsort of) including the associated perl).\n>\n>> > system cannot find the path specified.' is displayed each time git is\n>> > run to get colors.\n>> >\n>> > Signed-off-by: Chris. Webster <chris@webstech.net>\n>> > ---\n>> >  contrib/diff-highlight/DiffHighlight.pm | 7 ++++++-\n>> >  1 file changed, 6 insertions(+), 1 deletion(-)\n>> >\n>> > diff --git a/contrib/diff-highlight/DiffHighlight.pm b/contrib/diff-highlight/DiffHighlight.pm\n>> > index 536754583..7440aa1c4 100644\n>> > --- a/contrib/diff-highlight/DiffHighlight.pm\n>> > +++ b/contrib/diff-highlight/DiffHighlight.pm\n>> > @@ -4,6 +4,11 @@ use 5.008;\n>> >  use warnings FATAL => 'all';\n>> >  use strict;\n>> >\n>> > +# Use the correct value for both UNIX and Windows (/dev/null vs nul)\n>> > +use File::Spec;\n>> > +\n>> > +my $NULL = File::Spec->devnull();\n>> > +\n>> >  # Highlight by reversing foreground and background. You could do\n>> >  # other things like bold or underline if you prefer.\n>> >  my @OLD_HIGHLIGHT = (\n>> > @@ -134,7 +139,7 @@ sub highlight_stdin {\n>> >  # fallback, which means we will work even if git can't be run.\n>> >  sub color_config {\n>> >       my ($key, $default) = @_;\n>> > -     my $s = `git config --get-color $key 2>/dev/null`;\n>> > +     my $s = `git config --get-color $key 2>$NULL`;\n>> >       return length($s) ? $s : $default;\n>> >  }\n"},{"id":"362077","messageId":"xmqqbm7awsvr.fsf@gitster-ct.c.googlers.com","threadId":"49716","inReplyTo":"CAGT1KpWC_+=u7fCzQJsU8d_gSQzE5rsx46cTXogvaRPHZ1iiHw@mail.gmail.com","subject":"Re: [PATCH 1/1] Use correct /dev/null for UNIX and Windows","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-10-31T06:08:08Z","receivedAt":"2018-10-31T06:08:12Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Chris Webster <chris@webstech.net> writes:\n\n>>> > Use File::Spec->devnull() for output redirection to avoid messages\n>>> > when Windows version of Perl is first in path.  The message 'The\n>>>\n>>> Dscho, \"Windows version of Perl is first in path\" somehow feels\n>>> contradicting with what one of the topics I saw from you were trying\n>>> to enforce (or, at least, \"set as the supported configuration\").\n>>>\n>>> I am guessing that the Perl you are building and shipping with Git\n>>> for Windows would yield what the shell that ends up running the\n>>> scriptlet `git config --get-color $key` prefers when asked for\n>>> File::Spec->devnull(), and nothing will break with this patch even\n>>> if that is \"/dev/null\", but I thought I'd double check.\n>>>\n>>> Thanks.\n>>>\n> This problem originally showed up in the\n> https://github.com/so-fancy/diff-so-fancy project, which has a copy of\n> DiffHighlight.pm.   That project allows diffsofancy (perl) to be run\n> from the command line without requiring the bash environment ((well ,\n> sort of) including the associated perl).\n\nThanks for additional comments.  \n\nIn any case, Windows is not my bailiwick, so I'll hope that the\nabove comments from you would help Dscho in his response and wait.\nI know use of File::Spec->devnull() won't hurt POSIX folks so making\nsure this won't break Git for Windows is the primary thing I woudl\nworry about this patch.\n\n"},{"id":"362091","messageId":"nycvar.QRO.7.76.6.1810311206230.4546@tvgsbejvaqbjf.bet","threadId":"49716","inReplyTo":"xmqqbm7awsvr.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH 1/1] Use correct /dev/null for UNIX and Windows","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2018-10-31T11:10:17Z","receivedAt":"2018-10-31T11:10:12Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Wed, 31 Oct 2018, Junio C Hamano wrote:\n\n> Chris Webster <chris@webstech.net> writes:\n> \n> >>> > Use File::Spec->devnull() for output redirection to avoid messages\n> >>> > when Windows version of Perl is first in path.  The message 'The\n> >>>\n> >>> Dscho, \"Windows version of Perl is first in path\" somehow feels\n> >>> contradicting with what one of the topics I saw from you were trying\n> >>> to enforce (or, at least, \"set as the supported configuration\").\n> >>>\n> >>> I am guessing that the Perl you are building and shipping with Git\n> >>> for Windows would yield what the shell that ends up running the\n> >>> scriptlet `git config --get-color $key` prefers when asked for\n> >>> File::Spec->devnull(), and nothing will break with this patch even\n> >>> if that is \"/dev/null\", but I thought I'd double check.\n> >>>\n> >>> Thanks.\n> >>>\n> > This problem originally showed up in the\n> > https://github.com/so-fancy/diff-so-fancy project, which has a copy of\n> > DiffHighlight.pm.   That project allows diffsofancy (perl) to be run\n> > from the command line without requiring the bash environment ((well ,\n> > sort of) including the associated perl).\n> \n> Thanks for additional comments.  \n> \n> In any case, Windows is not my bailiwick, so I'll hope that the\n> above comments from you would help Dscho in his response and wait.\n> I know use of File::Spec->devnull() won't hurt POSIX folks so making\n> sure this won't break Git for Windows is the primary thing I woudl\n> worry about this patch.\n\nIndeed, the patch in question regards something I consider outside Git for\nWindows' realm. As Chris said, you can run this script from a PowerShell\nprompt, without any Git Bash (and without Git's Perl) involved.\n\nI am fine with this patch, as long as the author name is fixed to match\nthe name in the Signed-off-by: footer ;-) [*1*]\n\nCiao,\nDscho\n\nFootnote *1*: This patch came in via GitGitGadget, and if I had infinite\namounts of time, I would probably implement some rudimentary pre-checks,\nsuch as: does the Author: header match the first Signed-off-by: footer, is\nthe commit message wrapped correctly, does the oneline have a prefix and\ncontinues lower-case, etc. And GitGitGadget would then point out the\nissues, possibly even try to fix them and push up the fixed commits.\n\nIf anybody agrees with these goals and is curious enough to dive into some\nTypescript programming, I'd be very happy to guide that person through\nimplementing this ;-)\n"},{"id":"362092","messageId":"nycvar.QRO.7.76.6.1810311210410.4546@tvgsbejvaqbjf.bet","threadId":"49716","inReplyTo":"xmqqo9bawvpf.fsf@gitster-ct.c.googlers.com","subject":"Re: [PATCH 1/1] Use correct /dev/null for UNIX and Windows","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2018-10-31T11:14:50Z","receivedAt":"2018-10-31T11:14:44Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 31 Oct 2018, Junio C Hamano wrote:\n\n> > From: chris <chris@webstech.net>\n> \n> Please make this line read like\n> \n> \tFrom: Chris Webster <chris@webstech.net>\n> \n> i.e. the author should be the person who is signing off that patch.\n\nThis is most likely recorded as the commit's author in the commit\nobject... Chris, to fix it, make sure that your `user.name` is configured\ncorrectly, and then call `git commit --amend --reset-author`.\n\n> > Use File::Spec->devnull() for output redirection to avoid messages\n> > when Windows version of Perl is first in path.  The message 'The\n> > system cannot find the path specified.' is displayed each time git is\n> > run to get colors.\n> >\n> > Signed-off-by: Chris. Webster <chris@webstech.net>\n> > ---\n> >  contrib/diff-highlight/DiffHighlight.pm | 7 ++++++-\n> >  1 file changed, 6 insertions(+), 1 deletion(-)\n> \n> There are a handful more instances of /dev/null found if you do\n> \n> \t$ git grep /dev/null -- \\*.pl \\*.pm\n> \n> The one in perl/Git.pm must be shared by scripts written in Perl, so\n> it may be worth giving the same tweak to it, like this patch does to\n> the highlight script.\n\nI do not think that perl/Git.pm is intended to run with any random Perl\ninterpreter. It has to be one that has been verified to work correctly\nwith the Perl code in perl/, and that code is notoriously reliant on POSIX\nbehavior, hence our choice to go with MSYS2 Perl (there *is* a MINGW Perl\npackage in Git for Windows' SDK, but it will most likely not work, in\nparticular because of the missing Subversion bindings).\n\nSo I would restrict the search to contrib/\\*.pl, contrib/\\*.perl and\ncontrib/\\*.pm. The stuff in contrib/ is supposed to be semi-independent\nfrom the particular Git one is using (and from whatever Perl is shipped\nwith it, if any).\n\nCiao,\nJohannes\n\n> > diff --git a/contrib/diff-highlight/DiffHighlight.pm b/contrib/diff-highlight/DiffHighlight.pm\n> > index 536754583..7440aa1c4 100644\n> > --- a/contrib/diff-highlight/DiffHighlight.pm\n> > +++ b/contrib/diff-highlight/DiffHighlight.pm\n> > @@ -4,6 +4,11 @@ use 5.008;\n> >  use warnings FATAL => 'all';\n> >  use strict;\n> >  \n> > +# Use the correct value for both UNIX and Windows (/dev/null vs nul)\n> > +use File::Spec;\n> > +\n> > +my $NULL = File::Spec->devnull();\n> > +\n> >  # Highlight by reversing foreground and background. You could do\n> >  # other things like bold or underline if you prefer.\n> >  my @OLD_HIGHLIGHT = (\n> > @@ -134,7 +139,7 @@ sub highlight_stdin {\n> >  # fallback, which means we will work even if git can't be run.\n> >  sub color_config {\n> >  \tmy ($key, $default) = @_;\n> > -\tmy $s = `git config --get-color $key 2>/dev/null`;\n> > +\tmy $s = `git config --get-color $key 2>$NULL`;\n> >  \treturn length($s) ? $s : $default;\n> >  }\n> \n"},{"id":"362135","messageId":"pull.59.v2.git.gitgitgadget@gmail.com","threadId":"49716","inReplyTo":"pull.59.git.gitgitgadget@gmail.com","subject":"[PATCH v2 0/1] DiffHighlight.pm: Use correct /dev/null for UNIX and Windows","fromName":"Chris. Webster via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2018-10-31T22:58:43Z","receivedAt":"2018-10-31T22:58:46Z","isPatch":true,"sender":{"key":"name:Chris. Webster","avatar":null},"body":"Use File::Spec->devnull() for output redirection to avoid messages when\nWindows version of Perl is first in path. The message 'The system cannot\nfind the path specified.' is displayed each time git is run to get colors.\n\nChris. Webster (1):\n  diff-highlight: Use correct /dev/null for UNIX and Windows\n\n contrib/diff-highlight/DiffHighlight.pm | 7 ++++++-\n 1 file changed, 6 insertions(+), 1 deletion(-)\n\n\nbase-commit: c670b1f876521c9f7cd40184bf7ed05aad843433\nPublished-As: https://github.com/gitgitgadget/git/releases/tags/pr-59%2Fwebstech%2Fmaster-v2\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-59/webstech/master-v2\nPull-Request: https://github.com/gitgitgadget/git/pull/59\n\nRange-diff vs v1:\n\n 1:  8159cbd1b8 ! 1:  bcbffa1411 Use correct /dev/null for UNIX and Windows\n     @@ -1,6 +1,6 @@\n     -Author: chris <chris@webstech.net>\n     +Author: Chris. Webster <chris@webstech.net>\n      \n     -    Use correct /dev/null for UNIX and Windows\n     +    diff-highlight: Use correct /dev/null for UNIX and Windows\n      \n          Use File::Spec->devnull() for output redirection to avoid messages\n          when Windows version of Perl is first in path.  The message 'The\n\n-- \ngitgitgadget\n"},{"id":"362142","messageId":"xmqqftwlv9td.fsf@gitster-ct.c.googlers.com","threadId":"49716","inReplyTo":"nycvar.QRO.7.76.6.1810311206230.4546@tvgsbejvaqbjf.bet","subject":"Re: [PATCH 1/1] Use correct /dev/null for UNIX and Windows","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-11-01T01:57:34Z","receivedAt":"2018-11-01T01:57:39Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> Indeed, the patch in question regards something I consider outside Git for\n> Windows' realm. As Chris said, you can run this script from a PowerShell\n> prompt, without any Git Bash (and without Git's Perl) involved.\n>\n> I am fine with this patch, as long as the author name is fixed to match\n> the name in the Signed-off-by: footer ;-) [*1*]\n\nThanks, I'll find a corrected patch on the list (or manufacture it\nout of the original) and queue, then.\n\n"},{"id":"362573","messageId":"nycvar.QRO.7.76.6.1811061501210.86@tvgsbejvaqbjf.bet","threadId":"49716","inReplyTo":"bcbffa141116f869db40e4572f9824a3d090c20c.1541026721.git.gitgitgadget@gmail.com","subject":"Re: [PATCH v2 1/1] diff-highlight: Use correct /dev/null for UNIX and Windows","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2018-11-06T14:01:59Z","receivedAt":"2018-11-06T14:02:06Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"List,\n\nI have no idea why this mail made it to GitGitGadget's email account but\nnot to the Git mailing list... Sorry about that.\n\nCiao,\nJohannes\n\nOn Wed, 31 Oct 2018, Chris. Webster via GitGitGadget wrote:\n\n> From: \"Chris. Webster\" <chris@webstech.net>\n> \n> Use File::Spec->devnull() for output redirection to avoid messages\n> when Windows version of Perl is first in path.  The message 'The\n> system cannot find the path specified.' is displayed each time git is\n> run to get colors.\n> \n> Signed-off-by: Chris. Webster <chris@webstech.net>\n> ---\n>  contrib/diff-highlight/DiffHighlight.pm | 7 ++++++-\n>  1 file changed, 6 insertions(+), 1 deletion(-)\n> \n> diff --git a/contrib/diff-highlight/DiffHighlight.pm b/contrib/diff-highlight/DiffHighlight.pm\n> index 536754583b..7440aa1c46 100644\n> --- a/contrib/diff-highlight/DiffHighlight.pm\n> +++ b/contrib/diff-highlight/DiffHighlight.pm\n> @@ -4,6 +4,11 @@ use 5.008;\n>  use warnings FATAL => 'all';\n>  use strict;\n>  \n> +# Use the correct value for both UNIX and Windows (/dev/null vs nul)\n> +use File::Spec;\n> +\n> +my $NULL = File::Spec->devnull();\n> +\n>  # Highlight by reversing foreground and background. You could do\n>  # other things like bold or underline if you prefer.\n>  my @OLD_HIGHLIGHT = (\n> @@ -134,7 +139,7 @@ sub highlight_stdin {\n>  # fallback, which means we will work even if git can't be run.\n>  sub color_config {\n>  \tmy ($key, $default) = @_;\n> -\tmy $s = `git config --get-color $key 2>/dev/null`;\n> +\tmy $s = `git config --get-color $key 2>$NULL`;\n>  \treturn length($s) ? $s : $default;\n>  }\n>  \n> -- \n> gitgitgadget\n> \n"},{"id":"374982","messageId":"CAGT1KpVn536+B6-8=opNAVnz3_w13Kx3LyED0Gbk+4DtwmoP6Q@mail.gmail.com","threadId":"49716","inReplyTo":"nycvar.QRO.7.76.6.1811061501210.86@tvgsbejvaqbjf.bet","subject":"Re: [PATCH v2 1/1] diff-highlight: Use correct /dev/null for UNIX and Windows","fromName":"Chris Webster","fromEmail":"chris@webstech.net","sentAt":"2019-05-07T04:18:55Z","receivedAt":"2019-05-07T04:19:00Z","isPatch":true,"sender":{"key":"chris@webstech.net","avatar":"https://avatars.githubusercontent.com/u/7956947?v=4"},"body":"I know these can take some time but is this pending any update from\nme?  The accepted changes will be merged back into the diff-so-fancy\nproject.\n\nThere was a question about other uses of /dev/null.  In the contrib\ndirectory, there are a couple of uses.\n\ncontrib/buildsystems/engine.pl - not clear if this is still of use or\nalways expects to always be running in a mingw type environment.\ncontrib/mw-to-git/git-remote-mediawiki.perl - this is cloned from a\nseparately maintained github project.  Should any changes be issues on\nthat project?\n\nthanks,\n...chris.\n\nOn Tue, Nov 6, 2018 at 6:02 AM Johannes Schindelin\n<Johannes.Schindelin@gmx.de> wrote:\n>\n> List,\n>\n> I have no idea why this mail made it to GitGitGadget's email account but\n> not to the Git mailing list... Sorry about that.\n>\n> Ciao,\n> Johannes\n>\n> On Wed, 31 Oct 2018, Chris. Webster via GitGitGadget wrote:\n>\n> > From: \"Chris. Webster\" <chris@webstech.net>\n> >\n> > Use File::Spec->devnull() for output redirection to avoid messages\n> > when Windows version of Perl is first in path.  The message 'The\n> > system cannot find the path specified.' is displayed each time git is\n> > run to get colors.\n> >\n> > Signed-off-by: Chris. Webster <chris@webstech.net>\n> > ---\n> >  contrib/diff-highlight/DiffHighlight.pm | 7 ++++++-\n> >  1 file changed, 6 insertions(+), 1 deletion(-)\n> >\n> > diff --git a/contrib/diff-highlight/DiffHighlight.pm b/contrib/diff-highlight/DiffHighlight.pm\n> > index 536754583b..7440aa1c46 100644\n> > --- a/contrib/diff-highlight/DiffHighlight.pm\n> > +++ b/contrib/diff-highlight/DiffHighlight.pm\n> > @@ -4,6 +4,11 @@ use 5.008;\n> >  use warnings FATAL => 'all';\n> >  use strict;\n> >\n> > +# Use the correct value for both UNIX and Windows (/dev/null vs nul)\n> > +use File::Spec;\n> > +\n> > +my $NULL = File::Spec->devnull();\n> > +\n> >  # Highlight by reversing foreground and background. You could do\n> >  # other things like bold or underline if you prefer.\n> >  my @OLD_HIGHLIGHT = (\n> > @@ -134,7 +139,7 @@ sub highlight_stdin {\n> >  # fallback, which means we will work even if git can't be run.\n> >  sub color_config {\n> >       my ($key, $default) = @_;\n> > -     my $s = `git config --get-color $key 2>/dev/null`;\n> > +     my $s = `git config --get-color $key 2>$NULL`;\n> >       return length($s) ? $s : $default;\n> >  }\n> >\n> > --\n> > gitgitgadget\n> >\n"},{"id":"375105","messageId":"CANg4QoEPWcnPpbUYcgR4PmECzjCOmroAmH2fMoX-vhw+W_dVnQ@mail.gmail.com","threadId":"49716","inReplyTo":"bcbffa141116f869db40e4572f9824a3d090c20c.1541026721.git.gitgitgadget@gmail.com","subject":"Fwd: [PATCH v2 1/1] diff-highlight: Use correct /dev/null for UNIX and Windows","fromName":"Git Gadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2019-05-08T10:45:53Z","receivedAt":"2019-05-08T10:46:07Z","isPatch":true,"sender":{"key":"gitgitgadget@gmail.com","avatar":null},"body":"Forwarding this mail to the Git mailing list, as the original did not\nmake it there (for reasons unknown).\n\n---------- Forwarded message ---------\nFrom: Chris. Webster via GitGitGadget <gitgitgadget@gmail.com>\nDate: Wed, Oct 31, 2018 at 11:58 PM\nSubject: [PATCH v2 1/1] diff-highlight: Use correct /dev/null for UNIX\nand Windows\nTo: <git@vger.kernel.org>\nCc: Junio C Hamano <gitster@pobox.com>, Chris. Webster <chris@webstech.net>\n\n\nFrom: \"Chris. Webster\" <chris@webstech.net>\n\nUse File::Spec->devnull() for output redirection to avoid messages\nwhen Windows version of Perl is first in path.  The message 'The\nsystem cannot find the path specified.' is displayed each time git is\nrun to get colors.\n\nSigned-off-by: Chris. Webster <chris@webstech.net>\n---\n contrib/diff-highlight/DiffHighlight.pm | 7 ++++++-\n 1 file changed, 6 insertions(+), 1 deletion(-)\n\ndiff --git a/contrib/diff-highlight/DiffHighlight.pm\nb/contrib/diff-highlight/DiffHighlight.pm\nindex 536754583b..7440aa1c46 100644\n--- a/contrib/diff-highlight/DiffHighlight.pm\n+++ b/contrib/diff-highlight/DiffHighlight.pm\n@@ -4,6 +4,11 @@ use 5.008;\n use warnings FATAL => 'all';\n use strict;\n\n+# Use the correct value for both UNIX and Windows (/dev/null vs nul)\n+use File::Spec;\n+\n+my $NULL = File::Spec->devnull();\n+\n # Highlight by reversing foreground and background. You could do\n # other things like bold or underline if you prefer.\n my @OLD_HIGHLIGHT = (\n@@ -134,7 +139,7 @@ sub highlight_stdin {\n # fallback, which means we will work even if git can't be run.\n sub color_config {\n        my ($key, $default) = @_;\n-       my $s = `git config --get-color $key 2>/dev/null`;\n+       my $s = `git config --get-color $key 2>$NULL`;\n        return length($s) ? $s : $default;\n }\n\n--\ngitgitgadget\n"},{"id":"375198","messageId":"xmqqh8a4fh68.fsf@gitster-ct.c.googlers.com","threadId":"49716","inReplyTo":"CANg4QoEPWcnPpbUYcgR4PmECzjCOmroAmH2fMoX-vhw+W_dVnQ@mail.gmail.com","subject":"Re: Fwd: [PATCH v2 1/1] diff-highlight: Use correct /dev/null for UNIX and Windows","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-05-09T03:19:43Z","receivedAt":"2019-05-09T03:19:55Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Git Gadget <gitgitgadget@gmail.com> writes:\n\n> Forwarding this mail to the Git mailing list, as the original did not\n> make it there (for reasons unknown).\n\nIt seems that the forwarding mechansim (if this weren't manual---I\ncannot tell) mangles whitespaces?  No need to resend, as the\nreceiving end manually fixed them up.\n\nThanks.\n\n>\n> ---------- Forwarded message ---------\n> From: Chris. Webster via GitGitGadget <gitgitgadget@gmail.com>\n> Date: Wed, Oct 31, 2018 at 11:58 PM\n> Subject: [PATCH v2 1/1] diff-highlight: Use correct /dev/null for UNIX\n> and Windows\n> To: <git@vger.kernel.org>\n> Cc: Junio C Hamano <gitster@pobox.com>, Chris. Webster <chris@webstech.net>\n>\n>\n> From: \"Chris. Webster\" <chris@webstech.net>\n>\n> Use File::Spec->devnull() for output redirection to avoid messages\n> when Windows version of Perl is first in path.  The message 'The\n> system cannot find the path specified.' is displayed each time git is\n> run to get colors.\n>\n> Signed-off-by: Chris. Webster <chris@webstech.net>\n> ---\n>  contrib/diff-highlight/DiffHighlight.pm | 7 ++++++-\n>  1 file changed, 6 insertions(+), 1 deletion(-)\n>\n> diff --git a/contrib/diff-highlight/DiffHighlight.pm\n> b/contrib/diff-highlight/DiffHighlight.pm\n> index 536754583b..7440aa1c46 100644\n> --- a/contrib/diff-highlight/DiffHighlight.pm\n> +++ b/contrib/diff-highlight/DiffHighlight.pm\n> @@ -4,6 +4,11 @@ use 5.008;\n>  use warnings FATAL => 'all';\n>  use strict;\n>\n> +# Use the correct value for both UNIX and Windows (/dev/null vs nul)\n> +use File::Spec;\n> +\n> +my $NULL = File::Spec->devnull();\n> +\n>  # Highlight by reversing foreground and background. You could do\n>  # other things like bold or underline if you prefer.\n>  my @OLD_HIGHLIGHT = (\n> @@ -134,7 +139,7 @@ sub highlight_stdin {\n>  # fallback, which means we will work even if git can't be run.\n>  sub color_config {\n>         my ($key, $default) = @_;\n> -       my $s = `git config --get-color $key 2>/dev/null`;\n> +       my $s = `git config --get-color $key 2>$NULL`;\n>         return length($s) ? $s : $default;\n>  }\n>\n> --\n> gitgitgadget\n"},{"id":"375250","messageId":"nycvar.QRO.7.76.6.1905092048130.44@tvgsbejvaqbjf.bet","threadId":"49716","inReplyTo":"xmqqh8a4fh68.fsf@gitster-ct.c.googlers.com","subject":"Re: Fwd: [PATCH v2 1/1] diff-highlight: Use correct /dev/null for UNIX and Windows","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2019-05-09T18:52:03Z","receivedAt":"2019-05-09T18:52:29Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Thu, 9 May 2019, Junio C Hamano wrote:\n\n> Git Gadget <gitgitgadget@gmail.com> writes:\n>\n> > Forwarding this mail to the Git mailing list, as the original did not\n> > make it there (for reasons unknown).\n>\n> It seems that the forwarding mechansim (if this weren't manual---I\n> cannot tell) mangles whitespaces?  No need to resend, as the\n> receiving end manually fixed them up.\n\nI did send it manually, via the GMail interface (which I seem to be unable\nto use effectively).\n\nSorry for the trouble, and thanks for fixing it up.\n\nFor the record, you could also always just fetch from the tag. The mails\nGitGitGadget sends (unless I manually forward mails) are generated from\nthose tags, so (modulo bugs) the sent patch and the commit(s) reachable\nfrom the published tag are identical.\n\nIn this instance, it would have been:\n\n\tgit fetch https://github.com/gitgitgadget/git \\\n\t\tpr-59/webstech/master-v2\n\nThank you,\nDscho\n"},{"id":"375354","messageId":"d8bd7df9-ec1a-3012-488e-1986dee9c9a5@iee.org","threadId":"49716","inReplyTo":"CAGT1KpVn536+B6-8=opNAVnz3_w13Kx3LyED0Gbk+4DtwmoP6Q@mail.gmail.com","subject":"Re: [PATCH v2 1/1] diff-highlight: Use correct /dev/null for UNIX and Windows","fromName":"Philip Oakley","fromEmail":"philipoakley@iee.org","sentAt":"2019-05-12T20:24:47Z","receivedAt":"2019-05-12T20:24:53Z","isPatch":true,"sender":{"key":"philipoakley@iee.email","avatar":"https://avatars.githubusercontent.com/u/914343?v=4"},"body":"Hi Chris,\n\n\nOn 07/05/2019 05:18, Chris Webster wrote:\n> I know these can take some time but is this pending any update from\n> me?  The accepted changes will be merged back into the diff-so-fancy\n> project.\n>\n> There was a question about other uses of /dev/null.  In the contrib\n> directory, there are a couple of uses.\n>\n> contrib/buildsystems/engine.pl - not clear if this is still of use or\n> always expects to always be running in a mingw type environment.\nWhile the `contrib/buildsystems/engine.pl ` is not often used, it does \nprovide a route for users of older Visual studio version.\nI'm not sure if the mingw environment is relevant to its operation - I'd \nexpect it (the generation of an .sln that would compile) to still work \nwith the current MSYS2 basis, but the `install` process was never fully \ncompleted (an probably isn't a worthwhile project unless you have the \nparticular itch to scratch).\n\nThe newer MSVC=1 build process using vcpkg has solved most of the \nissues, but I'm getting a couple of issues with some of the \nlibraries/include paths with the latest VS2017, see issue #2186 / #2179 \n/ https://groups.google.com/forum/#!topic/git-for-windows/Y99a0dzlVJY , \nthough hopefully I'll get them sorted this week.\n\n> contrib/mw-to-git/git-remote-mediawiki.perl - this is cloned from a\n> separately maintained github project.  Should any changes be issues on\n> that project?\n>\n> thanks,\n> ...chris.\n>\n> On Tue, Nov 6, 2018 at 6:02 AM Johannes Schindelin\n> <Johannes.Schindelin@gmx.de> wrote:\n>> List,\n>>\n>> I have no idea why this mail made it to GitGitGadget's email account but\n>> not to the Git mailing list... Sorry about that.\n>>\n>> Ciao,\n>> Johannes\n>>\n>> On Wed, 31 Oct 2018, Chris. Webster via GitGitGadget wrote:\n>>\n>>> From: \"Chris. Webster\" <chris@webstech.net>\n>>>\n>>> Use File::Spec->devnull() for output redirection to avoid messages\n>>> when Windows version of Perl is first in path.  The message 'The\n>>> system cannot find the path specified.' is displayed each time git is\n>>> run to get colors.\n>>>\n>>> Signed-off-by: Chris. Webster <chris@webstech.net>\n>>> ---\n>>>   contrib/diff-highlight/DiffHighlight.pm | 7 ++++++-\n>>>   1 file changed, 6 insertions(+), 1 deletion(-)\n>>>\n>>> diff --git a/contrib/diff-highlight/DiffHighlight.pm b/contrib/diff-highlight/DiffHighlight.pm\n>>> index 536754583b..7440aa1c46 100644\n>>> --- a/contrib/diff-highlight/DiffHighlight.pm\n>>> +++ b/contrib/diff-highlight/DiffHighlight.pm\n>>> @@ -4,6 +4,11 @@ use 5.008;\n>>>   use warnings FATAL => 'all';\n>>>   use strict;\n>>>\n>>> +# Use the correct value for both UNIX and Windows (/dev/null vs nul)\n>>> +use File::Spec;\n>>> +\n>>> +my $NULL = File::Spec->devnull();\n>>> +\n>>>   # Highlight by reversing foreground and background. You could do\n>>>   # other things like bold or underline if you prefer.\n>>>   my @OLD_HIGHLIGHT = (\n>>> @@ -134,7 +139,7 @@ sub highlight_stdin {\n>>>   # fallback, which means we will work even if git can't be run.\n>>>   sub color_config {\n>>>        my ($key, $default) = @_;\n>>> -     my $s = `git config --get-color $key 2>/dev/null`;\n>>> +     my $s = `git config --get-color $key 2>$NULL`;\n>>>        return length($s) ? $s : $default;\n>>>   }\n>>>\n>>> --\n>>> gitgitgadget\n>>>\n\n"}]}