Re: [PATCH 2/2] add--interactive.perl: specify --no-color explicitly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff King <peff@xxxxxxxx> writes:

> By the way, this is an instance of a more generic bug, which is that:
>
>   git -p my-script
>
> will cause any sub-programs of git-my-script to think their stdout is
> going to a pager, even if my-script redirects them to a file or another
> pipe.
>
> I had a solution long ago in:
>
>   https://lore.kernel.org/git/20150810052353.GB15441@xxxxxxxxxxxxxxxxxxxxx/
>
> but it raises a bunch of interesting portability questions. Since this
> comes up so rarely, I never really pursued it further.

That indeed is from long ago ;-) and I still kind of like it.  Is
the issue that some platforms do not even have inum of the "thing"
connected to a file descriptor?  I think a fallback code for such a
system can just return a constant pipe ID to anybody asks, so that
an exported GIT_PAGER_PIPE_ID would always match, which gives the
behaviour identical to what we currently do with GIT_PAGER_IN_USE,
and that would be one way to help those capable of giving useful IDs
while not harming others.

Thanks.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux