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

Re: [PATCH] log: allow to specify diff pathspec in addition to prune pathspec

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 4, 2011, 22:07 UTC
Message-ID
<7vsjm3a6dc.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1320322556-32675-1-git-send-email-pclouds@gmail.com>
Nguyễn Thái Ngọc Duy  <pclouds@gmail.com> writes:
> This form requires specifying "--" twice. If a file name happens to be
> "--", it may be misunderstood as the second "--" marker. This is an
> unfortunate consequence for this syntax. Users can still use "./--" or
> similar to workaround this.

This is not a new "problem" (and it is probably not a problem to begin with). If you had "--" in the working tree and you wanted to treat it as a path, you said either one of these:

    $ git log HEAD ./--
    $ git log HEAD -- --
The latter is what your patch breaks, I suspect.

Also it forces existing scripts and programs that knew "everything in this array is a pathspec" and added "--" before adding the contents of the array to form a command line to drive "git log" family of commands to be updated.

Previous: Nguyen Thai Ngoc Duy
Message 5 of 5 in “log: support --full-diff=<pathspec>”
  1. log: support --full-diff=<pathspec>Nguyễn Thái Ngọc Duy, Nov 3, 2011
  2. log: allow to specify diff pathspec in addition to prune pathspecNguyễn Thái Ngọc Duy, Nov 3, 2011
  3. Junio C HamanoNov 4, 2011
  4. Nguyen Thai Ngoc DuyNov 5, 2011
  5. Junio C HamanoNov 4, 2011

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.