Re: Bug: git add with absolute path fails if repo root dir is a symlink

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

 



On Mon, Dec 27, 2010 at 10:23:12AM +0300, Alexander Gladysh wrote:
> 
> > I can't run git add with absolute path if the repository's root
> > directory is a symlink.
> 
> Note that this issue is also triggered if *any* of the directories in
> path above of my repo are symlinks.

When using absolute path names, git will compare the path given with the
git work tree and any name that is referred through a symlink in that
will trigger a mismatch.

> Is there a way to quickly workaround this somehow?

use relative paths (implemented below through an alias named "myadd") :

[alias]
        myadd = "!sh -c 'cd `dirname \"$1\"` && git add `basename \"$1\"`' -"

so in your workflow you would use "myadd" instead of "add" to convert your
absolute paths (with symlinks) into relative paths

Carlo
--
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]