{"thread":{"id":"42865","subject":"format-patch with pager.format-patch=true gets very confused","startedAt":"2016-07-17T02:56:54Z","lastAt":"2016-07-17T19:25:44Z","messageCount":3,"participants":["Josh Triplett","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"291611","messageId":"20160717025642.GA30640@x","threadId":"42865","inReplyTo":null,"subject":"format-patch with pager.format-patch=true gets very confused","fromName":"Josh Triplett","fromEmail":"josh@joshtriplett.org","sentAt":"2016-07-17T02:56:44Z","receivedAt":"2016-07-17T02:56:54Z","isPatch":false,"sender":{"key":"josh@joshtriplett.org","avatar":"https://avatars.githubusercontent.com/u/162737?v=4"},"body":"git-config(1) documents the ability to enable or disable the pager (or\nset a command-specific pager) for any command by setting\npager.<cmd>=true.  For most commands, this seems to work as expected.\nHowever, setting pager.format-patch=true (or setting it to any specific\npager) breaks badly: the pager spawns, with no output in it, and the\npager doesn't respond to keystrokes (which makes it difficult to quit).\n\nI think this may occur because format-patch's \"reopen_stdout\" interacts\nbadly with the pager.\n\nI think it makes sense for \"format-patch --stdout\" to respect\npager.format-patch, but for format-patch *without* stdout to ignore\npager.* and *never* spawn a pager, given that its only output (the list\nof patch files) goes to \"realstdout\".\n\n- Josh Triplett\n"},{"id":"291627","messageId":"alpine.DEB.2.20.1607171438030.28832@virtualbox","threadId":"42865","inReplyTo":"20160717025642.GA30640@x","subject":"Re: format-patch with pager.format-patch=true gets very confused","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-07-17T12:41:48Z","receivedAt":"2016-07-17T12:42:00Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Josh,\n\nOn Sat, 16 Jul 2016, Josh Triplett wrote:\n\n> git-config(1) documents the ability to enable or disable the pager (or\n> set a command-specific pager) for any command by setting\n> pager.<cmd>=true.  For most commands, this seems to work as expected.\n> However, setting pager.format-patch=true (or setting it to any specific\n> pager) breaks badly: the pager spawns, with no output in it, and the\n> pager doesn't respond to keystrokes (which makes it difficult to quit).\n> \n> I think this may occur because format-patch's \"reopen_stdout\" interacts\n> badly with the pager.\n> \n> I think it makes sense for \"format-patch --stdout\" to respect\n> pager.format-patch, but for format-patch *without* stdout to ignore\n> pager.* and *never* spawn a pager, given that its only output (the list\n> of patch files) goes to \"realstdout\".\n\nAs per http://article.gmane.org/gmane.comp.version-control.git/299451,\nthe `js/log-to-diffopt-file` patch series will be merged to `master` soon.\nThis patch series avoids the reopen() altogether and should fix the\nproblem you experience.\n\nSince it is already in `next`, it should be relatively easy for you to\nbuild and confirm. Would you kindly do that?\n\nThanks,\nJohannes\n"},{"id":"291635","messageId":"20160717192019.GA29262@x","threadId":"42865","inReplyTo":"alpine.DEB.2.20.1607171438030.28832@virtualbox","subject":"Re: format-patch with pager.format-patch=true gets very confused","fromName":"Josh Triplett","fromEmail":"josh@joshtriplett.org","sentAt":"2016-07-17T19:20:19Z","receivedAt":"2016-07-17T19:25:44Z","isPatch":false,"sender":{"key":"josh@joshtriplett.org","avatar":"https://avatars.githubusercontent.com/u/162737?v=4"},"body":"On Sun, Jul 17, 2016 at 02:41:48PM +0200, Johannes Schindelin wrote:\n> Hi Josh,\n> \n> On Sat, 16 Jul 2016, Josh Triplett wrote:\n> \n> > git-config(1) documents the ability to enable or disable the pager (or\n> > set a command-specific pager) for any command by setting\n> > pager.<cmd>=true.  For most commands, this seems to work as expected.\n> > However, setting pager.format-patch=true (or setting it to any specific\n> > pager) breaks badly: the pager spawns, with no output in it, and the\n> > pager doesn't respond to keystrokes (which makes it difficult to quit).\n> > \n> > I think this may occur because format-patch's \"reopen_stdout\" interacts\n> > badly with the pager.\n> > \n> > I think it makes sense for \"format-patch --stdout\" to respect\n> > pager.format-patch, but for format-patch *without* stdout to ignore\n> > pager.* and *never* spawn a pager, given that its only output (the list\n> > of patch files) goes to \"realstdout\".\n> \n> As per http://article.gmane.org/gmane.comp.version-control.git/299451,\n> the `js/log-to-diffopt-file` patch series will be merged to `master` soon.\n> This patch series avoids the reopen() altogether and should fix the\n> problem you experience.\n> \n> Since it is already in `next`, it should be relatively easy for you to\n> build and confirm. Would you kindly do that?\n\nI can confirm that that fixes the problem.  Thanks!\n\n- Josh Triplett\n"}]}