[BUG] Clones from local repositories do not work correctly under Windows

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

 



Thank you for filling out a Git bug report!
Please answer the following questions to help us understand your issue.

What did you do before the bug happened? (Steps to reproduce your issue)

Under Windows 10 21H2, I cloned a Git repository off an existing local
copy, then applied a patch to it using `git am`.

What did you expect to happen? (Expected behavior)

Operations on the repo like `git status` and `git log` should work out
of the box.

What happened instead? (Actual behavior)

I keep getting this error:

> error: unable to normalize alternate object path:
/c/Users/Amalia/.cache/cerbero-sources/librsvg-2.40.20/.git/objects

With `git status` it happens only once, but with `git log` it's a wall
worth of that error before the log is actually generated and paged.

This error makes Git complain, but tools depending on it (in particular
Cargo) outright crash. For instance, this is the error I got when
attempting to build the Rust crate above:

> Error: CliError { error: Some(failed to determine package fingerprint
for build script for librsvg v2.58.0-beta.1
(E:\cerbero\build\sources\msvc_x86_64\librsvg-2.40.20\rsvg)
>
> Caused by:
>     0: failed to determine the most recently modified file in
E:\cerbero\build\sources\msvc_x86_64\librsvg-2.40.20\rsvg
>     1: failed to determine list of files in
E:\cerbero\build\sources\msvc_x86_64\librsvg-2.40.20\rsvg
>     2: object not found - no match for id
(32467a0191907fd571b502e395d033a06dfee655); class=Odb (9); code=NotFound
(-3)), exit_code: 101 }

What's different between what you expected and what actually happened?

It seems that under Windows, the code in
https://github.com/git/git/blame/436d4e5b14df49870a897f64fe92c0ddc7017e4c/object-file.c#L525
is not able to resolve the absolute path of the "remote" (the original
copy) at all. I checked if it was a filesystem traversal issue by
issuing the clone against a folder in the same drive, but there was no
change.

Anything else you want to add:

Possibly introduced in 2.39.0:
https://github.com/git/git/commit/199337d6ec5c656e52b914b5dac3820cc5e363f3

Please review the rest of the bug report below.
You can delete any lines you don't wish to share.


[System Info]
git version:
git version 2.44.0.windows.1
cpu: x86_64
built from commit: ad0bbfffa543db6979717be96df630d3e5741331
sizeof-long: 4
sizeof-size_t: 8
shell-path: /bin/sh
feature: fsmonitor--daemon
uname: Windows 10.0 19045
compiler info: gnuc: 13.2
libc info: no libc information available
$SHELL (typically, interactive shell): <unset>


[Enabled Hooks]

-- 
amyspark 🌸 https://www.amyspark.me





[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