public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: Jeff King <peff@peff•net>
Cc: Duy Nguyen <pclouds@gmail•com>,
	Graeme Geldenhuys <mailinglists@geldenhuys•co.uk>,
	git@vger•kernel.org
Subject: Re: Git archiving only branch work
Date: Thu, 13 Nov 2014 13:48:12 -0800	[thread overview]
Message-ID: <xmqq61eizs9v.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20141113213937.GD7563@peff.net> (Jeff King's message of "Thu, 13 Nov 2014 16:39:38 -0500")

Jeff King <peff@peff•net> writes:

> 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.

You do not have to generate, i.e. you should be allowed to do this:

    $ git cmd --stdin -z <list-of-patterns

And this is not about "flexibility".  Unless your plan is to forbid
a corner case you do not anticipate and always disable pathspec
globbing, you would need to say something like:

	--literal-pathspecs::

        	All Git command lines take dashed options first and
		then revs and then "pathspecs".  They are usually
		used to select the paths using glob(1)-like
		matching, but with this option they must match the
		paths byte-for-byte.

                Except when "--stdin -z" is used, in which case you
                need to give "--no-literal-pathspecs" if you want to
                feed patterns.

Which is awkward.  And "--stdin -z" is most likely used in scripts;
we are not forcing people to keep typing --literal-pathspecs by
leaving them orthogonal *and* people do not have to remember one
more exception (the default of --literal-pathspecs is flipped only
when --stdin -z is in use) to the rule.

  reply	other threads:[~2014-11-13 21:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-13 12:32 Git archiving only branch work Graeme Geldenhuys
2014-11-13 13:19 ` Peter Krefting
2014-11-13 13:36 ` Duy Nguyen
2014-11-13 16:49   ` Junio C Hamano
2014-11-13 20:06   ` Jeff King
2014-11-13 21:10     ` Junio C Hamano
2014-11-13 21:33       ` Jeff King
2014-11-13 21:36         ` Junio C Hamano
2014-11-13 21:39           ` Jeff King
2014-11-13 21:48             ` Junio C Hamano [this message]
2014-11-14 15:32               ` Jeff King
2014-11-14 20:35                 ` Junio C Hamano
2014-11-13 16:10 ` Thomas Koch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq61eizs9v.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=mailinglists@geldenhuys$(echo .)co.uk \
    --cc=pclouds@gmail$(echo .)com \
    --cc=peff@peff$(echo .)net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox