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

Re: BUG. Git config pager when --edit

From
Jeff King <peff@peff.net>
Date
Nov 7, 2011, 17:18 UTC
Message-ID
<20111107171800.GA3621@sigill.intra.peff.net>
In-Reply-To
<7vpqh327ds.fsf@alter.siamese.dyndns.org>
On Mon, Nov 07, 2011 at 09:02:23AM -0800, Junio C Hamano wrote:
Show 10 quoted lines
> Jeff King <peff@peff.net> writes:
> 
> > I should probably polish and submit the patch here:
> >
> >   http://thread.gmane.org/gmane.comp.version-control.git/182238/focus=182475
> 
> I was actually hoping that you won't go that route, but the route to push
> further to decide/spawn pager as late as possible. Clearly no sane person
> would want to run --edit subcommand under pager and "pager.config = less"
> should just be ignored in such a case.

The problem with that is that it dumps the responsibility for running the pager to every subcommand. For builtins, we can have a flag that says "respect the pager.log config" or "foo will handle this itself; don't respect pager.tag".

But what about externals? If "pager.stash" does nothing in git.c, and leaves it to "git-stash.sh" to start the pager if and when it's appropriate, then what about my personal "git-foo" that I drop into my PATH? Now I can't use "config.foo" without carrying code to do so in my external command.

Maybe that's an OK tradeoff. But it's more of a pain for existing scripts, and it's not backwards compatible. What do you think?

-Peff
Previous: Junio C HamanoNext: Frans Klaver
Message 5 of 9 in “BUG. Git config pager when --edit”
  1. Alexey ShumkinNov 7, 2011
  2. Frans KlaverNov 7, 2011
  3. Jeff KingNov 7, 2011
  4. Junio C HamanoNov 7, 2011
  5. Jeff KingNov 7, 2011
  6. Frans KlaverNov 7, 2011
  7. how to merge sub directory or file?Emily, Nov 7, 2011
  8. Konstantin KhomoutovNov 7, 2011
  9. Emily RenNov 8, 2011

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.