git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Torstein Hegge <hegge@resisty.net>
Cc: git@vger.kernel.org, szeder@ira.uka.de
Subject: Re: [PATCH] t9903: Don't fail when run from path accessed through symlink
Date: Thu, 11 Apr 2013 15:17:49 -0400	[thread overview]
Message-ID: <20130411191749.GD3177@sigill.intra.peff.net> (raw)
In-Reply-To: <20130411185322.GF14619@pvv.ntnu.no>

On Thu, Apr 11, 2013 at 08:53:22PM +0200, Torstein Hegge wrote:

> When the git directory is accessed through a symlink like
> 
>   ln -s /tmp/git /tmp/git-symlink
>   cd /tmp/git-symlink/t
>   make -C .. && ./t9903-bash-prompt.sh
> 
> $TRASH_DIRECTORY is /tmp/git-symlink/t/trash directory.t9903-bash-prompt
> and $(pwd -P) is /tmp/git/t/trash directory.t9903-bash-prompt.
> 
> When __gitdir looks up the path through 'git rev-parse --git-dir', it
> will return paths similar to $(pwd -P). This behavior is already tested in
> t9903 'gitdir - resulting path avoids symlinks'.

Thanks, this makes sense to me, and is the same solution used in other
scripts (e.g., t2300), so I don't think we have to worry about any
portability concerns with "pwd -P".

-Peff

      reply	other threads:[~2013-04-11 19:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-11 18:53 [PATCH] t9903: Don't fail when run from path accessed through symlink Torstein Hegge
2013-04-11 19:17 ` Jeff King [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=20130411191749.GD3177@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=hegge@resisty.net \
    --cc=szeder@ira.uka.de \
    /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).