Re: [BUG] Clones from local repositories do not work correctly under Windows
- From
- L. E. Segovia <amy@amyspark.me>
- Date
- Apr 12, 2024, 20:10 UTC
- Message-ID
- <c0353f84-de98-4c74-90fb-bfe1c3f14d21@amyspark.me>
- In-Reply-To
- <02b801da8d00$b2c5b9f0$18512dd0$@nexbridge.com>
Hi all,
In Cerbero, we use cygpath or a bespoke conversion mechanism, depending on availability:
https://gitlab.freedesktop.org/gstreamer/cerbero/-/blob/main/cerbero/utils/__init__.py#L142-149
I'm not sure if there's a function in MSYS2's libc exposing that.
amyspark
On 12/04/2024 14:41, rsbecker@nexbridge.com wrote:
Show 36 quoted lines
> On Friday, April 12, 2024 1:33 PM, Junio C Hamano wrote: >> Johannes Sixt <j6t@kdbg.org> writes: >> >>> alternate: C:/Temp/repoorig/.git/objects >>> alternate: /c/Temp/repoorig/.git/objects >>> >>> This is the MSYS2/Cygwin absolute path with a "drive letter". >>> Unfortunately, this kind of path is unintelligible for Git for Windows. >>> It expects absolute paths to begin with drive letter-colon or a >>> double-slash or double-backslash. For this reason, it reports "unable >>> to normalize alternate object path". >>> >>> The conclusion is: Do not use two different flavors of Git on a >>> repository that is set up with a link to an alternate repository. >> >> I do not complain to the conclusion, and I do not use Windows, but it makes > me >> wonder if there is a way to spell that full path that can be understood by > both >> implementations. The two implementations are not incompatible in the > actual >> object contents and refnames and other things in .git/ directory, are they? >> >> In short, does MSYS2/Cygwin understand paths in "C:/Temp/..." style, and if > so, >> writing that out, even though it may not what it considers the native > format, would >> make the world a happier place. > > I'm my environment (<2 month old Cygwin update), the path would be > /cygdrive/c/temp... I have not had issues using that style with git. Cygwin > itself does not understand C:\Temp (resolves to C:temp), but does understand > C:/Temp in bash and various utilities. It also understands (and expects) ~ > to mean /home/user (C:\Cygwin64\home\user) in the Cygwin space, not relative > to C:\Users\user for resolving .gitconfig. >
-- amyspark 🌸 https://www.amyspark.me