git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [2.46 regression] git ls-remote crash with import remote-helper
@ 2024-07-27 19:19 Mike Hommey
  2024-07-28  3:54 ` Junio C Hamano
  2024-08-02  4:44 ` [PATCH] builtin/ls-remote: fall back to SHA1 outside of a repo Patrick Steinhardt
  0 siblings, 2 replies; 6+ messages in thread
From: Mike Hommey @ 2024-07-27 19:19 UTC (permalink / raw)
  To: git

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

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

end of thread, other threads:[~2024-08-02 15:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-27 19:19 [2.46 regression] git ls-remote crash with import remote-helper Mike Hommey
2024-07-28  3:54 ` Junio C Hamano
2024-07-29 15:41   ` Patrick Steinhardt
2024-07-29 17:18     ` Junio C Hamano
2024-08-02  4:44 ` [PATCH] builtin/ls-remote: fall back to SHA1 outside of a repo Patrick Steinhardt
2024-08-02 15:26   ` Junio C Hamano

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).