git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[2.46 regression] git ls-remote crash with import remote-helper

From
Mike Hommey <mh@glandium.org>
Date
Jul 27, 2024, 19:19 UTC
Message-ID
<20240727191917.p64ul4jybpm2a7hm@glandium.org>
Hi,

Running `git ls-remote $helper::$url` crashes when run outside a git repo and the helper uses the import feature.

Here is a minimal reproducer: ``` $ cat > git-remote-foo <<EOF #!/bin/sh echo import echo refspec '*:*' EOF $ chmod +x git-remote-foo $ PATH=$PWD:$PATH git ls-remote foo::bar ```

The crash happens in parse_refspec in refspec.c, on a deref of the_hash_algo, because the_hash_also is not set anymore at that point since c8aed5e8da.

Mike
Next: Junio C Hamano
Message 1 of 6 in “[2.46 regression] git ls-remote crash with import remote-helper”
  1. Mike HommeyJul 27, 2024
  2. Junio C HamanoJul 28, 2024
  3. Patrick SteinhardtJul 29, 2024
  4. Junio C HamanoJul 29, 2024
  5. builtin/ls-remote: fall back to SHA1 outside of a repoPatrick Steinhardt, Aug 2, 2024
  6. Junio C HamanoAug 2, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.