EXDEV when re-init with --separate-git-dir option

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

 



Dear maintainers,

We discovered that re-init with option --separate-git-dir will throw
an EXDEV when the target directory is not on the same file system as
the original directory.

An example is shown below:

$ mkdir -p fs1/gitdir fs2
$ ls
fs1  fs2
$ sudo mount -t tmpfs tmpfs fs2
$ cd fs1/gitdir
$ git init
Initialized empty Git repository in /home/user/fs1/gitdir/.git/
$ git init --separate-git-dir ../../fs2/surrealgitdir
fatal: unable to move /home/user/fs1/gitdir/.git to
/home/user/fs2/surrealgitdir: Invalid cross-device link

We tested this on version v2.45.2 and after reading the code a bit we
believe the issue still exist in the master branch on github
(https://github.com/git/git/blob/d19b6cd2dd72dc811f19df4b32c7ed223256c3ee/setup.c#L2280).

Best regards,
Di




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

  Powered by Linux