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

Re: [RFC] column: show auto columns when pager is active

From
Jeff King <peff@peff.net>
Date
Oct 10, 2017, 14:10 UTC
Message-ID
<20171010141019.3vfowj4fvxdvvl3c@sigill.intra.peff.net>
In-Reply-To
<20171009214543.12986-1-me@ikke.info>
On Mon, Oct 09, 2017 at 11:45:43PM +0200, Kevin Daudt wrote:
Show 12 quoted lines
> +test_expect_success TTY '20 columns, mode auto, pager' '
> +	cat >expected <<\EOF &&
> +one    seven
> +two    eight
> +three  nine
> +four   ten
> +five   eleven
> +six
> +EOF
> +	test_terminal env PAGER="cat|cat" git column --mode=auto <lista >actual &&
> +	test_cmp expected actual
> +'

I don't think "git column" will run the pager by default, will it? You'd need "git -p" here.

That said, I'm still puzzled why it would return zero output. Strace shows that the read from stdin is getting no input. I suspect this may have to do with how we redirect stdin in test-terminal.perl.

See 18d8c26930 (test_terminal: redirect child process' stdin to a pty, 2015-08-04), which claims there's some raciness with closing the descriptor.

-Peff
Previous: Jeff KingNext: Jeff King
Message 8 of 21 in “[RFC] column: show auto columns when pager is active”
  1. Kevin DaudtOct 9, 2017
  2. Eric SunshineOct 9, 2017
  3. Martin ÅgrenOct 10, 2017
  4. Jeff KingOct 10, 2017
  5. Martin ÅgrenOct 10, 2017
  6. Kevin DaudtOct 11, 2017
  7. Jeff KingOct 12, 2017
  8. Jeff KingOct 10, 2017
  9. Jeff KingOct 10, 2017
  10. Martin ÅgrenOct 10, 2017
  11. Kevin DaudtOct 10, 2017
  12. column: show auto columns when pager is activeKevin Daudt, Oct 11, 2017
  13. Martin ÅgrenOct 11, 2017
  14. Kevin DaudtOct 11, 2017
  15. Martin ÅgrenOct 11, 2017
  16. column: show auto columns when pager is activeKevin Daudt, Oct 16, 2017
  17. Junio C HamanoOct 17, 2017
  18. Jonathan NiederOct 23, 2017
  19. Junio C HamanoOct 24, 2017
  20. Jonathan NiederOct 24, 2017
  21. Kevin DaudtOct 24, 2017

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.