Re: [WIP PATCH 0/5] support --exclude for diff/log commands

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

 



Nguyán ThÃi Ngác Duy  <pclouds@xxxxxxxxx> writes:

> On the other hand, if we go with ':' as a mark of special pathspecs, then
>
>  - ":/" mark pathspecs relative to worktree root
>  - ":!" may mark negative pathspecs

I am still moderately negative on this "negative pathspec" stuff, as it
will complicate the semantics (just one example: would a path that is
covered by both positive and negative pathspecs included or excluded?
would the last one win? would the more specific one win?) and makes the
design harder to explain to the users. Depending on the semantics chosen,
it may also make the implementation less efficient and more complex.

As the choice of the syntax goes, in the recent "grep --full-tree"
discussion, I thought people are more or less happy with the colon
prefixed "magic pathspec" syntax, and something along the lines of the
above two seems to be a good design.

The two most important things to consider are to make sure that people
with funny pathnames can work it around by quoting, and the prefixing
scheme is extensible so that other types of magic can later be introduced
with the same kind of escape hatch for people with funny pathnames that
begin with or contain new magic characters used to trigger the new magic.

I said "something along the lines" above because ":/ for root, :! for
negative" does not yet specify how the scheme would satisfy the above
two consideration very well.

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