Re: [PATCH] grep: --full-tree

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

 



On Wed, Nov 25, 2009 at 5:00 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
>  - git does not accept paths (it lets you specify patterns that match,
>   e.g. t/ to name ptahs under t/ directory).

That's not entirely true, unfortunately:

$ echo >> unpack-trees.c
$ git diff --name-status unpack-trees.c
M       unpack-trees.c
$ git diff --name-status $PWD/unpack-trees.c
M       unpack-trees.c
$ git diff --name-status $PWD/../git/unpack-trees.c
M       unpack-trees.c
$ git diff --name-status ../git/unpack-trees.c
fatal: '../git/unpack-trees.c' is outside repository

So it seems that 'git diff' accepts absolute paths as long as they end up
in the repository, but oddly enough, doesn't do so for relative paths.
It's possible that some users have scripts that use absolute paths, and
changing the interpretation would break those scripts.  Such scripts
*should* be rare, so maybe it's ok to break them, but it needs to be
considered.

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