Usability improvement request: git show revision -- file
- From
Piotr Krukowiecki <piotr.krukowiecki@gmail.com>
- Date
- Mar 31, 2011, 06:45 UTC
- Message-ID
- <AANLkTi=JPVXD7Je7Rz9yhKHnJo+K2rs5WnwTY22c3h6L@mail.gmail.com>
Hi,
if there's existing way to do this please tell me.
There's this file "src/subdir/file". I'm in the "src" directory and want to see the "file" at specific revision.
Knowing about git show I'd expect something like this to work:
$ git show master -- subdir/file
But it shows nothing (no output, no warning). Following also does not work as expected:
$ git show master:subdir/file fatal: Path 'src/subdir/file' exists, but not 'subdir/file'. Did you mean 'master:src/subdir/file'?
Of course following works:
$ git show master:src/subdir/file
but it's not very convenient to have to specify full path, and it's not what you would expect given that most other commands accept "-- relativepath" syntax.
-- Piotr Krukowiecki