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

[PATCH v2 0/7] Re: 'git svn log' no longer uses the pager

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Feb 19, 2010, 06:50 UTC
Message-ID
<20100219065010.GA22258@progeny.tock>

Here is a replacement for the jn/maint-fix-pager series currently in pu. As for the previous version, the point is to fix the breakage from dec543 (am -i, git-svn: use "git var GIT_PAGER", 2009-10-30) reported at http://thread.gmane.org/gmane.comp.version-control.git/139831 I also added some new tests to make sure pagination works in other ways.

In this version, patches 1-5 are the same fixes as before, with commit messages tweaked to take into account feedback from the previous round. You can see what they fix by using 'git svn log' and the '(v)iew' option of 'git am --interactive', which both stopped paginating output in commit dec543. You can see what they don’t break by running some other command such as 'git log' in circumstances where its output is not supposed to be paginated.

The test in patch 6 has some fixes that didn’t make it to pu last time. To avoid risk of spewing useless output to /dev/tty, the tests requiring a terminal only run with the --verbose option.

Patch 7 is the one I am most interested in feedback about. It allows automatic runs of tests without a real terminal by creating its own pty as needed. But it might be a portability nightmare: is posix_openpt widely available? Will open("/dev/ptmx", ...) do just as well most places? And how important is it that these tests run on the most obscure platforms?

Because these questions are still up in the air for me, I do not think patch 7 is suitable for use outside pu yet. What I would most like to hear is that /dev/ptmx works often enough, because that is a condition that can be tested for at runtime without adding complication to the Makefile. But if that is not the case, there are other options.

Jonathan Nieder (7):
  Fix 'git var' usage synopsis
  Make 'git var GIT_PAGER' always print the configured pager
  git.1: Clarify the behavior of the --paginate option
  git svn: Fix launching of pager
  am: Fix launching of pager
  tests: Add tests for automatic use of pager
  t7006-pager: if stdout is not a terminal, make a new one
 .gitignore                |    1 +
 Documentation/git-var.txt |    2 +-
 Documentation/git.txt     |    8 ++-
 Makefile                  |    6 ++
 builtin-var.c             |    4 +-
 cache.h                   |    2 +-
 git-am.sh                 |    5 +-
 git-sh-setup.sh           |   13 ++++
 git-svn.perl              |    9 ++-
 pager.c                   |    6 +-
 t/t7006-pager.sh          |  171 +++++++++++++++++++++++++++++++++++++++++++++
 test-terminal.c           |   62 ++++++++++++++++
 12 files changed, 274 insertions(+), 15 deletions(-)
 create mode 100644 t/t7006-pager.sh
 create mode 100644 test-terminal.c
Next: Jonathan Nieder
Message 1 of 26 in “Re: 'git svn log' no longer uses the pager”
  1. 0/7 Re: 'git svn log' no longer uses the pagerJonathan Nieder, Feb 19, 2010
  2. 1/7 Fix 'git var' usage synopsisJonathan Nieder, Feb 19, 2010
  3. 2/7 Make 'git var GIT_PAGER' always print the configured pagerJonathan Nieder, Feb 19, 2010
  4. 3/7 git.1: Clarify the behavior of the --paginate optionJonathan Nieder, Feb 19, 2010
  5. 4/7 git svn: Fix launching of pagerJonathan Nieder, Feb 19, 2010
  6. 5/7 am: Fix launching of pagerJonathan Nieder, Feb 19, 2010
  7. 6/7 tests: Add tests for automatic use of pagerJonathan Nieder, Feb 19, 2010
  8. Junio C HamanoFeb 20, 2010
  9. 6/7 tests: Add tests for automatic use of pagerJonathan Nieder, Feb 21, 2010
  10. 7/7 t7006-pager: if stdout is not a terminal, make a new oneJonathan Nieder, Feb 21, 2010
  11. Jeff KingFeb 21, 2010
  12. Johannes SixtFeb 22, 2010
  13. 8/7 tests: Fix race condition in t7006-pagerJonathan Nieder, Feb 22, 2010
  14. Jonathan NiederFeb 22, 2010
  15. 7/7 t7006-pager: if stdout is not a terminal, make a new oneJonathan Nieder, Feb 19, 2010
  16. Jeff KingFeb 19, 2010
  17. Jonathan NiederFeb 19, 2010
  18. Jeff KingFeb 19, 2010
  19. Brandon CaseyFeb 19, 2010
  20. Brandon CaseyFeb 20, 2010
  21. Jonathan NiederFeb 20, 2010
  22. Brandon CaseyFeb 20, 2010
  23. 7/7 t7006-pager: if stdout is not a terminal, make a new oneJonathan Nieder, Feb 20, 2010
  24. Junio C HamanoFeb 20, 2010
  25. 7/7 t7006-pager: if stdout is not a terminal, make a new oneJonathan Nieder, Feb 20, 2010
  26. Simplify test-terminal.perlJonathan Nieder, Feb 20, 2010

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.