Re: log/show: relative pathnames do not work in rev:path

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

 




On Tue, 18 Dec 2007, Dana How wrote:
> 
> Both of your counterexamples use 2 disjoint directory trees:
> C: vs D:,  or trees on different machines.
> 
> The cases we are talking about are all subtrees of the working tree.
> There is a useful cwd suffix.

No.

The cases we're talking of are *not* subtrees of the working tree.

The SHA1 of a commit may well be a totally disjoint tree. Try it in the 
git repository with something like

	git show origin/man:man1/git-fsck.1

or

	git show origin/todo:TODO

and realize that Dscho's examples of using the DOS/Windows drive letters 
is actually a really good example of what that <commit>:<pathname> syntax 
is. 

In fact, you can very well think of the commit/tree as a "drive letter". 
It really does go into another namespace entirely. It's just that often 
that namespace does bear some relationship to the currently checked out 
branch. But that's just an "often", it's not at all a given.

> Don't you think that
>   git <op> commit:./file.c
> could occasionally be more convenient than
>   git <op> commit:very/long/and/boring/path/equal/to/cwd/file.c

It's not about "convenience". It's about *sanity* and good design. And the 
fact is, that "commit:path" format really has nothing to do with the CWD 
in the general case.

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

  Powered by Linux