Thread (3 messages) flat view 3 messages, 3 authors, 2016-06-15

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

From: James Pickens <hidden>
Date: 2016-06-15 22:47:46

On Wed, Nov 25, 2009 at 5:00 PM, Junio C Hamano [off-list ref] 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help