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

Re: [PATCH v3 2/3] fast-import: add option command

From
Shawn O. Pearce <spearce@spearce.org>
Date
Aug 14, 2009, 17:39 UTC
Message-ID
<20090814173929.GU1033@spearce.org>
In-Reply-To
<fabb9a1e0908140937h32a2eac7ka88f76aa417fd631@mail.gmail.com>
Sverre Rabbelier <srabbelier@gmail.com> wrote:
Show 13 quoted lines
> On Fri, Aug 14, 2009 at 08:37, Shawn O. Pearce<spearce@spearce.org> wrote:
> > Sverre Rabbelier <srabbelier@gmail.com> wrote:
> >> +`option`
> >> +~~~~~~~~
> >> +Processes the specified option so that git fast-import behaves in a
> >> +way that suits the frontend's needs.
> >> +Note that options specified by the frontend are overridden by any
> >> +options the user may specify to git fast-import itself.
> >
> > Wha? ?This disagrees with the code.
> 
> It does? It's saying that the user my override what the frontend
> specifies, which is what the current version does.
Sorry, lack of caffeine.  Rereading the docs makes sense.
 
Show 11 quoted lines
> >> + ? ? if (!seen_non_option_command)
> >> + ? ? ? ? ? ? parse_argv();
> >
> > This is too late.
> 
> No it's not. Earlier in the patch, at the other
> 'seen_non_option_command', we call parse_argv() as well (which happens
> when a non-option command is issued). This statement is here to deal
> with options that affect an empty stream, such as 'git format-patch
> --import-marks=marks.old --export-marks=marks.new < /dev/null &&
> test_cmp marks.old marks.new'.
Oy, I missed that call.  I looked for it but gave up too soon I guess.
 
> > So yea, I really do think its a good idea for command line options
> > to override stream options, despite what Dscho may think. ?:-)
> 
> Which is what the current version does, yes?
Yes.  :-)
-- 
Shawn.
Previous: Sverre RabbelierNext: Sverre Rabbelier
Message 7 of 8 in “fast-import: add a new option command”
  1. 0/3 fast-import: add a new option commandSverre Rabbelier, Aug 13, 2009
  2. 1/3 fast-import: put option parsing code in seperate functionsSverre Rabbelier, Aug 13, 2009
  3. 2/3 fast-import: add option commandSverre Rabbelier, Aug 13, 2009
  4. 3/3 fast-import: test the new option commandSverre Rabbelier, Aug 13, 2009
  5. Shawn O. PearceAug 14, 2009
  6. Sverre RabbelierAug 14, 2009
  7. Shawn O. PearceAug 14, 2009
  8. Sverre RabbelierAug 14, 2009

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.