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

Re: pager config for external commands

From
JMJeffrey Middleton <jefromi@gmail.com>
Date
Nov 19, 2010, 17:16 UTC
Message-ID
<AANLkTikE6=At-BV22myZtM4nuNL6z4hoJ-kS=O1LkBXo@mail.gmail.com>
In-Reply-To
<20101119160058.GA7967@sigill.intra.peff.net>
On Fri, Nov 19, 2010 at 10:00 AM, Jeff King <peff@peff.net> wrote:
Show 5 quoted lines
> Basically the problem is that we just call execv("git-<cmd>"). If it
> works, then we are running an external, but we no longer have an
> opportunity to start the pager. If it doesn't, then we don't necessarily
> want to commit our pager choice. We may be running an alias, or we may
> simply barf with "no such command".

Okay, that makes sense, I think. But execv_dashed_external does currently commit the pager choice, just without looking it up from the config. This means that, for example, git --paginate <nonexistent-command> does invoke the pager. Is that intended? I don't think I see any tests covering the combination of pager.<cmd> for anything but builtins.

Also, instead of having git implement "look up in PATH" internally, would it make sense to simply commit the pager choice, try the execv, then uncommit the pager choice if the command was not found?

Jeffrey
Previous: Jeff KingNext: Jeff King
Message 3 of 4 in “pager config for external commands”
  1. Jeffrey MiddletonNov 19, 2010
  2. Jeff KingNov 19, 2010
  3. Jeffrey MiddletonNov 19, 2010
  4. Jeff KingNov 19, 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.