git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* format-patch with pager.format-patch=true gets very confused
@ 2016-07-17  2:56 Josh Triplett
  2016-07-17 12:41 ` Johannes Schindelin
  0 siblings, 1 reply; 3+ messages in thread
From: Josh Triplett @ 2016-07-17  2:56 UTC (permalink / raw)
  To: git

git-config(1) documents the ability to enable or disable the pager (or
set a command-specific pager) for any command by setting
pager.<cmd>=true.  For most commands, this seems to work as expected.
However, setting pager.format-patch=true (or setting it to any specific
pager) breaks badly: the pager spawns, with no output in it, and the
pager doesn't respond to keystrokes (which makes it difficult to quit).

I think this may occur because format-patch's "reopen_stdout" interacts
badly with the pager.

I think it makes sense for "format-patch --stdout" to respect
pager.format-patch, but for format-patch *without* stdout to ignore
pager.* and *never* spawn a pager, given that its only output (the list
of patch files) goes to "realstdout".

- Josh Triplett

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: format-patch with pager.format-patch=true gets very confused
  2016-07-17  2:56 format-patch with pager.format-patch=true gets very confused Josh Triplett
@ 2016-07-17 12:41 ` Johannes Schindelin
  2016-07-17 19:20   ` Josh Triplett
  0 siblings, 1 reply; 3+ messages in thread
From: Johannes Schindelin @ 2016-07-17 12:41 UTC (permalink / raw)
  To: Josh Triplett; +Cc: git

Hi Josh,

On Sat, 16 Jul 2016, Josh Triplett wrote:

> git-config(1) documents the ability to enable or disable the pager (or
> set a command-specific pager) for any command by setting
> pager.<cmd>=true.  For most commands, this seems to work as expected.
> However, setting pager.format-patch=true (or setting it to any specific
> pager) breaks badly: the pager spawns, with no output in it, and the
> pager doesn't respond to keystrokes (which makes it difficult to quit).
> 
> I think this may occur because format-patch's "reopen_stdout" interacts
> badly with the pager.
> 
> I think it makes sense for "format-patch --stdout" to respect
> pager.format-patch, but for format-patch *without* stdout to ignore
> pager.* and *never* spawn a pager, given that its only output (the list
> of patch files) goes to "realstdout".

As per http://article.gmane.org/gmane.comp.version-control.git/299451,
the `js/log-to-diffopt-file` patch series will be merged to `master` soon.
This patch series avoids the reopen() altogether and should fix the
problem you experience.

Since it is already in `next`, it should be relatively easy for you to
build and confirm. Would you kindly do that?

Thanks,
Johannes

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: format-patch with pager.format-patch=true gets very confused
  2016-07-17 12:41 ` Johannes Schindelin
@ 2016-07-17 19:20   ` Josh Triplett
  0 siblings, 0 replies; 3+ messages in thread
From: Josh Triplett @ 2016-07-17 19:20 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: git

On Sun, Jul 17, 2016 at 02:41:48PM +0200, Johannes Schindelin wrote:
> Hi Josh,
> 
> On Sat, 16 Jul 2016, Josh Triplett wrote:
> 
> > git-config(1) documents the ability to enable or disable the pager (or
> > set a command-specific pager) for any command by setting
> > pager.<cmd>=true.  For most commands, this seems to work as expected.
> > However, setting pager.format-patch=true (or setting it to any specific
> > pager) breaks badly: the pager spawns, with no output in it, and the
> > pager doesn't respond to keystrokes (which makes it difficult to quit).
> > 
> > I think this may occur because format-patch's "reopen_stdout" interacts
> > badly with the pager.
> > 
> > I think it makes sense for "format-patch --stdout" to respect
> > pager.format-patch, but for format-patch *without* stdout to ignore
> > pager.* and *never* spawn a pager, given that its only output (the list
> > of patch files) goes to "realstdout".
> 
> As per http://article.gmane.org/gmane.comp.version-control.git/299451,
> the `js/log-to-diffopt-file` patch series will be merged to `master` soon.
> This patch series avoids the reopen() altogether and should fix the
> problem you experience.
> 
> Since it is already in `next`, it should be relatively easy for you to
> build and confirm. Would you kindly do that?

I can confirm that that fixes the problem.  Thanks!

- Josh Triplett

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-07-17 19:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-17  2:56 format-patch with pager.format-patch=true gets very confused Josh Triplett
2016-07-17 12:41 ` Johannes Schindelin
2016-07-17 19:20   ` Josh Triplett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).