author | Junio C Hamano <gitster@pobox.com> | |
Wed, 25 Jul 2007 23:22:55 +0000 (16:22 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 25 Jul 2007 23:22:55 +0000 (16:22 -0700) | ||
commit | d58e8d34b019d435b424811c6f972910dfac6f55 | |
tree | e36d2949e7dade4dca78fc6c70c5e9519ca8c741 | tree | snapshot |
parent | 1a44be9a0ff6fa623ff6061992f5ad1831dc7cab | commit | diff |
When locking in a symlinked repository, try to lock the original.
In a working tree prepared in new-workdir (in contrib/), some files in .git/
directory are symbolic links to the original repository. The usual sequence of
lock-write-rename would break the symbolic link.
Ideally we should resolve relative symbolic link with maxdepth, but I do not
want to risk too elaborate patch before 1.5.3 release, so this is a minimum
and trivially obvious fix. new-workdir creates its symbolic links absolute,
and does not link from a symlinked workdir, so this fix should suffice for now.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
In a working tree prepared in new-workdir (in contrib/), some files in .git/
directory are symbolic links to the original repository. The usual sequence of
lock-write-rename would break the symbolic link.
Ideally we should resolve relative symbolic link with maxdepth, but I do not
want to risk too elaborate patch before 1.5.3 release, so this is a minimum
and trivially obvious fix. new-workdir creates its symbolic links absolute,
and does not link from a symlinked workdir, so this fix should suffice for now.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
lockfile.c | diff | blob | history |