git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Teemu Likonen <tlikonen@iki.fi>
To: Luciano Rocha <luciano@eurotux.com>
Cc: git@vger.kernel.org
Subject: Re: rev-parse doesn't take pwd into consideration
Date: Mon, 26 May 2008 23:18:42 +0300	[thread overview]
Message-ID: <20080526201842.GA8194@mithlond.arda.local> (raw)
In-Reply-To: <20080526195812.GA23396@bit.office.eurotux.com>

Luciano Rocha wrote (2008-05-26 20:58 +0100):

> Is it difficult to make rev-parse accept relative path specifications?

I don't know but let's consider this: The revision user is asking for
with "git show <commit>:<path>" may not even contain the directory user
is currently in. Also, there may not be any working directory at all, or
user may be completely outside the repository and using "git
--git-dir=/somewhere/else". I guess the system is much simpler as the
"<commit>:" always refers to repository's root.

If you are using Git's bash completions it's easy to complete paths with
"git show <commit>:". For example, try

  $ git show HEAD~10:Docum<tab>

and the path is completed.

  parent reply	other threads:[~2008-05-26 20:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-26 19:58 rev-parse doesn't take pwd into consideration Luciano Rocha
2008-05-26 20:15 ` Junio C Hamano
2008-05-26 21:42   ` Johannes Schindelin
2008-05-26 20:18 ` Teemu Likonen [this message]
2008-05-26 20:52   ` Luciano Rocha
2008-05-26 21:35 ` しらいしななこ
2008-05-26 21:44   ` Johannes Schindelin
2008-05-26 21:48   ` Junio C Hamano
2008-05-26 22:14   ` Luciano Rocha
2008-05-26 23:14   ` Luciano Rocha
2008-05-27 10:53   ` しらいしななこ

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080526201842.GA8194@mithlond.arda.local \
    --to=tlikonen@iki.fi \
    --cc=git@vger.kernel.org \
    --cc=luciano@eurotux.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).