Re: [PATCH] config.mak.uname: Cygwin: Use renames for creation
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 10, 2015, 19:08 UTC
- Message-ID
- <xmqqwpx3t102.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <55C7883C.7040504@dinwoodie.org>
Adam Dinwoodie <adam@dinwoodie.org> writes:
> If the desired goal is that Cygwin's link(2) acts like POSIX link(2) > on network drives, I'm not convinced that's possible, at least not by > emulating `core.createObject = rename` in the Cygwin library > layer.
The way core.createObject=rename makes things work is by avoiding link(2) in the first place and using rename(2) instead. You might be able to emulate rename(2) of A to B by doing a link(2) of A to B and then unlink(2) of A, but I do not think it is reasonable for the system call emulation layer to detect a sequence of link followed by unlink and use rename, i.e. emulationg the other way around.
So I suspect "fix in Cygwin" is a non-starter.
But in the end, I'd prefer the choice of the compiled-in default up to the port maintainers. You earlier said:
This problem was reported on the Cygwin mailing list at
https://cygwin.com/ml/cygwin/2015-08/msg00102.html (amongst others) and
is being applied as a manual patch to the Cygwin builds until the patch
is taken here.so my preference is to see Cygwin continue to do so for a couple release cycles of ours to make sure all Cygwin end-users are happy and consider the flip of the default a good change for them, and then the official Cygwin packager of Git sends a patch our way.
https://cygwin.com/ml/cygwin/2015-08/msg00102.html seems to indicate that somebody called Adam Dinwoodie is wearing Git maintainer hat, so perhaps you may be that "official Cygwin packager of Git" ;-)
I agree with everything you said in that message to Peter---the patch should be included when you hear reports of `git config core.createObject rename` helping more people. After versions of Cygwin Git package with such a change proves good, let's reduce the workload of Cygwin Git maintainer by upstreaming that change to my tree. But not before.
Thanks.