git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Feature request: relative paths
@ 2010-05-06  6:01 Eli Barzilay
  2010-05-06  8:31 ` Jonathan Nieder
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Barzilay @ 2010-05-06  6:01 UTC (permalink / raw)
  To: git

An svn feature that I used a lot is `svn cat some-file' -- and with
git I can get close to that with `git show :some-file', except that
unlike other paths, it must be an absolute path from the repository
root.  I could obviously make up a script that will do it, but that's
just buying myself some time until I find some other command where
I'll want to use it.

It looks like it would be relatively easy to do this, since when I do
specify the relative path I get an error message suggesting the full
one (provided that the relative path is simple -- no ".." etc).  So,
now that I can actually UTSL, I went there, and tried some half-assed
hacking -- I made it so "::path" uses the prefix and normalizes the
result, so, for example

  cd git/Documentation
  git show ::../Documentation/./user-manual.conf

works as expected.  Using "::" looks bad IMO, and the hack I did is
likely suffering from some problems, but overall it doesn't look too
hard.

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-05-06  9:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-06  6:01 Feature request: relative paths Eli Barzilay
2010-05-06  8:31 ` Jonathan Nieder
2010-05-06  8:46   ` Björn Steinbrink
2010-05-06  9:01     ` Jonathan Nieder
2010-05-06  9:09       ` Jeff King
2010-05-06  9:04     ` Jeff King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).