git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUG] Clones from local repositories do not work correctly under Windows
@ 2024-04-11 17:03 L. E. Segovia
  2024-04-12  6:56 ` Johannes Sixt
  0 siblings, 1 reply; 9+ messages in thread
From: L. E. Segovia @ 2024-04-11 17:03 UTC (permalink / raw)
  To: git

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-04-12 21:54 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-11 17:03 [BUG] Clones from local repositories do not work correctly under Windows L. E. Segovia
2024-04-12  6:56 ` Johannes Sixt
2024-04-12 13:05   ` L. E. Segovia
2024-04-12 16:16     ` Johannes Sixt
2024-04-12 17:19       ` L. E. Segovia
2024-04-12 17:32       ` Junio C Hamano
2024-04-12 17:41         ` rsbecker
2024-04-12 20:10           ` L. E. Segovia
2024-04-12 21:53         ` Johannes Sixt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).