Re: Git archiving only branch work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff King <peff@xxxxxxxx> 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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]