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

Re: [PATCH 5/6] archive: allow --exec and --remote without equal sign

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 26, 2008, 00:31 UTC
Message-ID
<7vmyk5pjsy.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<1216982486-5887-6-git-send-email-rene.scharfe@lsrfire.ath.cx>
Rene Scharfe <rene.scharfe@lsrfire.ath.cx> writes:
Show 14 quoted lines
> Convert git archive to parse_options().  The parameters --remote and --exec
> are still handled by their special parser.  Define them anyway in order for
> them to show up in the usage notice.
>
> Note: in a command like "git archive --prefix --remote=a/ HEAD", the string
> "--remote=a/" will be interpreted as a remote option, not a prefix, because
> that special parser sees it first.  If one needs such a strange prefix, it
> needs to be specified like this: "git archive --prefix=--remote=a/ HEAD"
> (with an equal sign).
>
> Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
> ---
>  archive.c |  110 +++++++++++++++++++++++++++++++++++++-----------------------
>  1 files changed, 68 insertions(+), 42 deletions(-)
Hmph, somewhat dubious.

The real point of parse-options was to make the code smaller, easier to maintain and command line handling more consistent. At least this patch seems to fail on the two out of three counts.

All of the other patches made obvious sense to me and are queued for -rc1 but I'd like to backburner this one.

Previous: René ScharfeNext: René Scharfe
Message 8 of 10 in “archive: add write_archive()”
  1. 1/6 archive: add write_archive()Rene Scharfe, Jul 25, 2008
  2. 2/6 archive: move parameter parsing code to archive.cRene Scharfe, Jul 25, 2008
  3. 3/6 archive: define MAX_ARGS where it's neededRene Scharfe, Jul 25, 2008
  4. 4/6 archive: declare struct archiver where it's neededRene Scharfe, Jul 25, 2008
  5. 5/6 archive: allow --exec and --remote without equal signRene Scharfe, Jul 25, 2008
  6. 5/6 archive: allow --exec and --remote without equal signRene Scharfe, Jul 25, 2008
  7. René ScharfeJul 25, 2008
  8. Junio C HamanoJul 26, 2008
  9. René ScharfeJul 26, 2008
  10. Junio C HamanoJul 26, 2008

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.