git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@linux-m68k.org>
To: "Dirk Süsserott" <newsletter@dirk.my1.cc>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: Q about git rev-parse {--is-inside-work-tree, --show-cdup}
Date: Sat, 04 Dec 2010 17:52:41 +0100	[thread overview]
Message-ID: <m24oatcwfa.fsf@igel.home> (raw)
In-Reply-To: <4CF95BDC.60506@dirk.my1.cc> ("Dirk Süsserott"'s message of "Fri, 03 Dec 2010 22:06:36 +0100")

Dirk Süsserott <newsletter@dirk.my1.cc> writes:

> 2. Wouldn't it be useful, if "git rev-parse --show-cdup" (2a) would
> return a dot "." instead of nothing if we are already in the topdir?
> That would make the steps (2a), (2b), (2c) to a simple "cd $(git
> rev-parse --show-cdup)".

The string returned by --show-cdup is to be used as prefix for a
relative path.  If you want to use it standalone just append ".":

cd $(git rev-parse --show-cdup).

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

      parent reply	other threads:[~2010-12-04 16:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-03 21:06 Q about git rev-parse {--is-inside-work-tree, --show-cdup} Dirk Süsserott
2010-12-03 21:20 ` Jeff King
2010-12-03 21:25 ` Junio C Hamano
2010-12-03 21:50   ` Jeff King
2010-12-04 15:12     ` Dirk Süsserott
2010-12-04 16:52 ` Andreas Schwab [this message]

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=m24oatcwfa.fsf@igel.home \
    --to=schwab@linux-m68k.org \
    --cc=git@vger.kernel.org \
    --cc=newsletter@dirk.my1.cc \
    /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).