Re: Feature request: relative paths

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

 



On Thu, May 06, 2010 at 10:46:07AM +0200, Björn Steinbrink wrote:

> > git show -- some-file
> 
> That's the same as "git show HEAD -- some-file" though, which shows a
> commit with path-limited diff output. While ":some-file" (most likely)
> identifies a blob, so "git show :some-file" shows the contents stored in
> that blob.

Yep. What Eli actually wants is to allow relative path specifiers in
tree-selectors. So you could do:

  git show :./some-file

or even

  git show HEAD~20:./some-file

and the "./" bit would magically expand into the current prefix within
the working tree.

This has come up several times on the list. It is a little bit of a
layering violation, because "treeish:path" may or may not bear any
resemblence to your current working tree. And the parsing of that syntax
happens in a fairly deep, library-ish place which doesn't know anything
about the working tree. However, in practice, I think it would be
extremely useful (because your working tree _does_ tend to be related to
the tree-ishs that you look at, especially if that tree-ish is HEAD).

I think in the past there was some vague negative sentiment around the
issues I described above. I don't think an actual patch was ever
produced, but I might be wrong. I suspect the only way to move the
discussion forward would be to actually show a patch.

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