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

Re: [PATCH 1/3] fast-export: improve argument parsing

From
Junio C Hamano <gitster@pobox.com>
Date
May 10, 2013, 04:49 UTC
Message-ID
<7v4neb5tj5.fsf@alter.siamese.dyndns.org>
In-Reply-To
<CAMP44s1GAeu5v5xqLu8BgisprmWN=C8zoFYNidoyBPXmu-cvJQ@mail.gmail.com>
Felipe Contreras <felipe.contreras@gmail.com> writes:
Show 7 quoted lines
> On Thu, May 9, 2013 at 6:27 PM, Junio C Hamano <gitster@pobox.com> wrote:
> ...
>> That is the kind of thing that needs to be said, not in the
>> discussion but in the history, either in the log or in a new test,
>> or both.
>
> If only I had known that when I wrote the commit message.

This is exactly what we review patches on the list for. There is no need to feel bad. Nobody expects anybody to be perfect on the first try.

Other people who may not know what the thought process of the author was when the patch was written (or those who may not be as familiar with the area in question as the author of the patch) can sometimes spot a gap in the thought that is recorded in the patch.

Regarding the text of the patch in question, I am of two minds. It may solve the "--import-marks foo" to swap the orders, but I suspect that may merely be shifting the problem and break rev-list options (e.g. "--since 3.days") for the same reason.

In the longer term, setup_revisions() may need to allow its callers to tell it what to do when it sees a parameter that it does not understand.

There already is a similar cascading mechanism in place from revision argument parsing to diff argument parsing (look for the place where diff_opt_parse() is called in revision.c). It may be just the matter of adding a "struct option *" to rev_info and calling parse_options_step() after diff_opt_parse() says "I dunno about this option".

For the mechanism to be more flexible, we may want to give the custom option table the caller of setup_revisions() gives us precedence over revision/diff options, though.

Previous: Felipe ContrerasNext: Felipe Contreras
Message 7 of 19 in “Support for old:new remote-helper push”
  1. 0/3 Support for old:new remote-helper pushFelipe Contreras, May 9, 2013
  2. 1/3 fast-export: improve argument parsingFelipe Contreras, May 9, 2013
  3. Junio C HamanoMay 9, 2013
  4. Felipe ContrerasMay 9, 2013
  5. Junio C HamanoMay 9, 2013
  6. Felipe ContrerasMay 9, 2013
  7. Junio C HamanoMay 10, 2013
  8. 2/3 fast-export: add new --refspec optionFelipe Contreras, May 9, 2013
  9. Junio C HamanoMay 9, 2013
  10. Felipe ContrerasMay 9, 2013
  11. Junio C HamanoMay 9, 2013
  12. Felipe ContrerasMay 9, 2013
  13. Junio C HamanoMay 10, 2013
  14. Felipe ContrerasMay 10, 2013
  15. Junio C HamanoMay 10, 2013
  16. Johannes SixtMay 10, 2013
  17. Felipe ContrerasMay 16, 2013
  18. 3/3 transport-helper: add support for old:new refspecFelipe Contreras, May 9, 2013
  19. Felipe ContrerasMay 16, 2013

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.