Re: [PATCH/alternative/raw and rough] setup.c: denote repo wide pathspecs by ':'

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

 



Nguyen Thai Ngoc Duy <pclouds@xxxxxxxxx> writes:

> No. ':foo' as a reference to 'foo' in index is a SHA1-extended syntax
> and I think we try to avoid ambiguation when a sha1-extended syntax
> may look like a path or vice versa.

Very true.

Just as a thought experiment (I am skeptical about this whole "this is
from root" prefix idea to begin with, but I don't want to shoot an idea
down prematurely when there may still be untold gems I haven't seen in
it):

    $ git grep -e frotz .../

to abbreviate "I don't bother to count my ../" might be an alternative,
though.

The reason I am skeptical about the "from root prefix" is because I do not
see a way to make it compatible with other meaningful pathspecs.

    $ cd Documentation
    $ git grep -e frotz '*.txt'

would find frotz in all *.txt files in Documentation (and its
subdirectories), if the command takes "relatigve to cwd".

It also is very clear that

    $ cd Documentation
    $ git grep --full-tree -e frotz '*.txt'

would find those anywhere, inside or outside Documentation.

On the other hand, it is natural to expect that

    $ git grep -e frotz ".../*.txt"

should find *.txt files _only_ at the root level, so it is not as useful as
the --full-tree (or --root).
--
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]