git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 1/1] diff-highlight: Use correct /dev/null for UNIX and Windows

From
Philip Oakley <philipoakley@iee.org>
Date
May 12, 2019, 20:24 UTC
Message-ID
<d8bd7df9-ec1a-3012-488e-1986dee9c9a5@iee.org>
In-Reply-To
<CAGT1KpVn536+B6-8=opNAVnz3_w13Kx3LyED0Gbk+4DtwmoP6Q@mail.gmail.com>
Hi Chris,
On 07/05/2019 05:18, Chris Webster wrote:
Show 9 quoted lines
> I know these can take some time but is this pending any update from
> me?  The accepted changes will be merged back into the diff-so-fancy
> project.
>
> There was a question about other uses of /dev/null.  In the contrib
> directory, there are a couple of uses.
>
> contrib/buildsystems/engine.pl - not clear if this is still of use or
> always expects to always be running in a mingw type environment.

While the `contrib/buildsystems/engine.pl ` is not often used, it does provide a route for users of older Visual studio version. I'm not sure if the mingw environment is relevant to its operation - I'd expect it (the generation of an .sln that would compile) to still work with the current MSYS2 basis, but the `install` process was never fully completed (an probably isn't a worthwhile project unless you have the particular itch to scratch).

The newer MSVC=1 build process using vcpkg has solved most of the issues, but I'm getting a couple of issues with some of the libraries/include paths with the latest VS2017, see issue #2186 / #2179 / https://groups.google.com/forum/#!topic/git-for-windows/Y99a0dzlVJY , though hopefully I'll get them sorted this week.

Show 59 quoted lines
> contrib/mw-to-git/git-remote-mediawiki.perl - this is cloned from a
> separately maintained github project.  Should any changes be issues on
> that project?
>
> thanks,
> ...chris.
>
> On Tue, Nov 6, 2018 at 6:02 AM Johannes Schindelin
> <Johannes.Schindelin@gmx.de> wrote:
>> List,
>>
>> I have no idea why this mail made it to GitGitGadget's email account but
>> not to the Git mailing list... Sorry about that.
>>
>> Ciao,
>> Johannes
>>
>> On Wed, 31 Oct 2018, Chris. Webster via GitGitGadget wrote:
>>
>>> From: "Chris. Webster" <chris@webstech.net>
>>>
>>> Use File::Spec->devnull() for output redirection to avoid messages
>>> when Windows version of Perl is first in path.  The message 'The
>>> system cannot find the path specified.' is displayed each time git is
>>> run to get colors.
>>>
>>> Signed-off-by: Chris. Webster <chris@webstech.net>
>>> ---
>>>   contrib/diff-highlight/DiffHighlight.pm | 7 ++++++-
>>>   1 file changed, 6 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/contrib/diff-highlight/DiffHighlight.pm b/contrib/diff-highlight/DiffHighlight.pm
>>> index 536754583b..7440aa1c46 100644
>>> --- a/contrib/diff-highlight/DiffHighlight.pm
>>> +++ b/contrib/diff-highlight/DiffHighlight.pm
>>> @@ -4,6 +4,11 @@ use 5.008;
>>>   use warnings FATAL => 'all';
>>>   use strict;
>>>
>>> +# Use the correct value for both UNIX and Windows (/dev/null vs nul)
>>> +use File::Spec;
>>> +
>>> +my $NULL = File::Spec->devnull();
>>> +
>>>   # Highlight by reversing foreground and background. You could do
>>>   # other things like bold or underline if you prefer.
>>>   my @OLD_HIGHLIGHT = (
>>> @@ -134,7 +139,7 @@ sub highlight_stdin {
>>>   # fallback, which means we will work even if git can't be run.
>>>   sub color_config {
>>>        my ($key, $default) = @_;
>>> -     my $s = `git config --get-color $key 2>/dev/null`;
>>> +     my $s = `git config --get-color $key 2>$NULL`;
>>>        return length($s) ? $s : $default;
>>>   }
>>>
>>> --
>>> gitgitgadget
>>>
Previous: Chris WebsterNext: Git Gadget
Message 15 of 18 in “DiffHighlight.pm: Use correct /dev/null for UNIX and Windows”
  1. 0/1 DiffHighlight.pm: Use correct /dev/null for UNIX and WindowsChris. Webster via GitGitGadget, Oct 30, 2018
  2. 1/1 Use correct /dev/null for UNIX and Windowschris via GitGitGadget, Oct 30, 2018
  3. Jeff KingOct 31, 2018
  4. Junio C HamanoOct 31, 2018
  5. Junio C HamanoOct 31, 2018
  6. Junio C HamanoOct 31, 2018
  7. Johannes SchindelinOct 31, 2018
  8. 0/1 DiffHighlight.pm: Use correct /dev/null for UNIX and WindowsChris. Webster via GitGitGadget, Oct 31, 2018
  9. Chris WebsterOct 31, 2018
  10. Junio C HamanoOct 31, 2018
  11. Johannes SchindelinOct 31, 2018
  12. Junio C HamanoNov 1, 2018
  13. Johannes SchindelinNov 6, 2018
  14. Chris WebsterMay 7, 2019
  15. Philip OakleyMay 12, 2019
  16. Fwd: [PATCH v2 1/1] diff-highlight: Use correct /dev/null for UNIX and WindowsGit Gadget, May 8, 2019
  17. Junio C HamanoMay 9, 2019
  18. Johannes SchindelinMay 9, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.