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

Re: [PATCH 4/4] Add new --diff-opts/-O flag to diff- and status-related commands.

From
Yann Dirson <ydirson@altern.org>
Date
Jun 5, 2007, 06:47 UTC
Message-ID
<20070605064730.GG6962@nan92-1-81-57-214-146.fbx.proxad.net>
In-Reply-To
<b0943d9e0706041515l6114a015ye45d40478cc0e3ef@mail.gmail.com>
On Mon, Jun 04, 2007 at 11:15:23PM +0100, Catalin Marinas wrote:
Show 14 quoted lines
> On 31/05/07, Yann Dirson <ydirson@altern.org> wrote:
> >This new flag allows to pass arbitrary flags to the git-diff calls
> >underlying several StGIT commands.  It can be used to pass flags
> >affecting both diff- and status-generating commands (eg. -M or -C), or
> >flags only affecting diff-generating ones (eg. --color, --binary).
> >
> >It supercedes --binary for commands where it was allowed,
> >'-O --binary' is now available for the same functionality.
> 
> BTW, should we add --binary by default to export and mail? Do you see
> any problem with this?
> 
> Another idea would be to add support for a [stgit "options"] section
> with entries like "mail = -O --binary".

Right, but we have to think how flags in the config file interact with flags on command line.

- does the command line shadow the config file completely (ie. "-O ''"
can be used for to not pass any flags), in which case, each time we
want a particular flag we need to pass all default ones again ?
- does the command line add to the flags specified from config file,
in which case we still need a way to override those ; I have 2 ideas
here: a flag that resets opts to '', or a flag to remove specific
flags (eg. if we have '--binary -w' in the config and we want
'--binary -C', we can say something like '-O -C --no-diff-opts -w').

Also useful would be to have different config defaults for the case where we go through the pager, but then we may have to guess when the pager will trigger (or maybe we can ask pydoc if the pager will trigger ?).

Best regards,
-- 
Yann
Previous: Catalin Marinas
Message 10 of 10 in “Rename detection, take 2”
  1. 0/4 Rename detection, take 2Yann Dirson, May 31, 2007
  2. 1/4 Add 2 new contrib scripts.Yann Dirson, May 31, 2007
  3. David KågedalJun 1, 2007
  4. Karl HasselströmJun 3, 2007
  5. Yann DirsonJun 3, 2007
  6. 2/4 Call external commands without a shell where possible.Yann Dirson, May 31, 2007
  7. 3/4 Make diff flags handling more modular.Yann Dirson, May 31, 2007
  8. 4/4 Add new --diff-opts/-O flag to diff- and status-related commands.Yann Dirson, May 31, 2007
  9. Catalin MarinasJun 4, 2007
  10. Yann DirsonJun 5, 2007

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.