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

Re: [PATCH v2 1/1] reset: support the --stdin option

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 27, 2017, 18:30 UTC
Message-ID
<xmqqh94kz76v.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20170127170422.lvpghp6jdud37zxx@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 14 quoted lines
> A few minor suggestions:
>
>> +--stdin::
>> +	Instead of taking list of paths from the command line,
>> +	read list of paths from the standard input.  Paths are
>> +	separated by LF (i.e. one path per line) by default.
>> +
>> +-z::
>> +	Only meaningful with `--stdin`; paths are separated with
>> +	NUL character instead of LF.
>
> Is it worth clarifying that these are paths, not pathspecs? The word
> "paths" is used to refer to the pathspecs on the command-line elsewhere
> in the document.

If the code forces literal pathspecs, then what the user feeds to the command is no longer pathspecs from the user's point of view, and I agree that the distinction is important.

If the remainder of the documentation is loose in terminology and the reason why we were able to get away with it was because we consistently used "paths" when we meant "pathspec", these existing mention of "paths" have to be tightened, either in this patch or a preparatory step patch before this one, because the addition of "this thing reads paths not pathspecs" is what makes them ambiguous.

Thanks. I re-read the part of the code that reads and unquotes as necessary in the patch and they looked correct.

Previous: Jeff KingNext: Jeff King
Message 19 of 23 in “Support `git reset --stdin`”
  1. 0/2 Support `git reset --stdin`Johannes Schindelin, Oct 11, 2016
  2. 1/2 reset: fix usageJohannes Schindelin, Oct 11, 2016
  3. 2/2 reset: support the --stdin optionJohannes Schindelin, Oct 11, 2016
  4. Junio C HamanoOct 11, 2016
  5. Johannes SchindelinOct 12, 2016
  6. Jakub NarębskiOct 11, 2016
  7. Johannes SchindelinOct 12, 2016
  8. Jeff KingOct 11, 2016
  9. Junio C HamanoOct 11, 2016
  10. Jeff KingOct 11, 2016
  11. Junio C HamanoOct 11, 2016
  12. Jeff KingOct 11, 2016
  13. Junio C HamanoOct 11, 2016
  14. 0/1 Support `git reset --stdin`Johannes Schindelin, Jan 27, 2017
  15. 1/1 reset: support the --stdin optionJohannes Schindelin, Jan 27, 2017
  16. Jeff KingJan 27, 2017
  17. Johannes SchindelinJan 27, 2017
  18. Jeff KingJan 27, 2017
  19. Junio C HamanoJan 27, 2017
  20. Jeff KingJan 27, 2017
  21. Junio C HamanoJan 28, 2017
  22. 0/1 Support `git reset --stdin`Johannes Schindelin, Jan 27, 2017
  23. 1/1 reset: support the --stdin optionJohannes Schindelin, Jan 27, 2017

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.