Git Mailing List Archive mirror
 help / color / mirror / Atom feed
From: "L. E. Segovia" <amy@amyspark.me>
To: git@vger.kernel.org
Subject: [BUG] Clones from local repositories do not work correctly under Windows
Date: Thu, 11 Apr 2024 14:03:43 -0300	[thread overview]
Message-ID: <44020a6a-707f-4505-adde-e79cda63d711@amyspark.me> (raw)

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


             reply	other threads:[~2024-04-11 17:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-11 17:03 L. E. Segovia [this message]
2024-04-12  6:56 ` [BUG] Clones from local repositories do not work correctly under Windows 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44020a6a-707f-4505-adde-e79cda63d711@amyspark.me \
    --to=amy@amyspark.me \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).