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

Re: Git archiving only branch work

From
Jeff King <peff@peff.net>
Date
Nov 13, 2014, 21:39 UTC
Message-ID
<20141113213937.GD7563@peff.net>
In-Reply-To
<xmqqa93uzssv.fsf@gitster.dls.corp.google.com>
On Thu, Nov 13, 2014 at 01:36:48PM -0800, Junio C Hamano wrote:
Show 10 quoted lines
> > I agree it is probably OK in practice and for the OP's question, but it
> > is nice to have "-z" variants so you do not have to worry about quoting
> > at all. I'd argue that a "--stdin -z" should probably also accept raw
> > filenames, not pathspecs, too (so you do not have to use
> > "--literal-pathspecs" elsewhere).
> 
> I agree "--stdin -z" is a good thing but what makes you think that
> the producer of the data is _always_ walking the directory hierarchy
> and showing the pathnames it sees?  I think use of literal-pathspecs
> should not be tied to the use of either --stdin or -z.

I agree they are technically orthogonal, but I cannot think of a case where I have ever generated actual _pathspecs_, which might have wildcards, and needed to use "-z". The point of using "-z" is that you do not know what crap you are feeding.

Normally I'm in favor of keeping things as flexible as possible, but it seems very likely that somebody would forget pathspecs in such a case (the OP did in his example, and I know I have many times in the past). I don't feel too strongly about it, though.

-Peff
Previous: Junio C HamanoNext: Junio C Hamano
Message 9 of 13 in “Git archiving only branch work”
  1. Graeme GeldenhuysNov 13, 2014
  2. Peter KreftingNov 13, 2014
  3. Duy NguyenNov 13, 2014
  4. Junio C HamanoNov 13, 2014
  5. Jeff KingNov 13, 2014
  6. Junio C HamanoNov 13, 2014
  7. Jeff KingNov 13, 2014
  8. Junio C HamanoNov 13, 2014
  9. Jeff KingNov 13, 2014
  10. Junio C HamanoNov 13, 2014
  11. Jeff KingNov 14, 2014
  12. Junio C HamanoNov 14, 2014
  13. Thomas KochNov 13, 2014

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.