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

Re: [PATCH/RFC] diff --relative: output paths as relative to the current subdirectory

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2016-06-15 22:44:13


On Tue, 12 Feb 2008, Linus Torvalds wrote:
No it isn't. The above doesn't even work for bare repositories, or when 
you want to look at a branch that has a different directory structure than 
the currently-checked-out one.
.. and I don't mean that as a theoretical thing. I don't personally use 
bare directories directly very much (I push to them, but I seldom do any 
other remote management than just repacking once in a while), but it _is_ 
a meaningful operation for various services like gitweb or gitk etc.

Obviously gitweb doesn't support that --relative thing right now, and 
maybe it never makes sense in that context, but it's actually really 
pleasant how many things *do* just "automatically work" with bare 
repositories etc.

So I simply don't think that we should assume a working directory for any 
basic git operation, unless that operation fundamentally needs one because 
it's only defined for a system with working directories (which is fairly 
rare, but obviously happens: "git reset --hard", "git pull/merge", "git 
checkout" etc).

			Linus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help