Re: [PATCH] t9903: Don't fail when run from path accessed through symlink

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]