Git Mailing List Archive mirror
 help / color / mirror / Atom feed
* Bug report: AM 3-way patching fails with partial cloning
@ 2023-07-03 16:46 Marius Schiffer
  2023-07-04 22:02 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Marius Schiffer @ 2023-07-03 16:46 UTC (permalink / raw)
  To: git

When applying patches with git am on a repository cloned with 
filter=blob:none, the patching sometimes fails when it can't find the 
required SHA1 information.
Applying the same thing on a normal clone works.
I'm not sure yet what exactly i s missing that is not fetched, but I 
guess git should be able to fetch the missing blobs. I would also be 
very happy to hear workarounds, as I really love git partial cloning.

Using git v2.41.0.

To reproduce:

1. Download this patch: 
https://raw.githubusercontent.com/projectceladon/vendor-intel-utils/master/bsp_diff/common/kernel/linux-intel-lts2021/0007-9p-freezing-aborts-when-use-wait_event_killable.patch

2. Clone this repository: git clone --filter=blob:none 
https://github.com/projectceladon/linux-intel-lts2021

3. Apply the patch: git am -3 
../0007-9p-freezing-aborts-when-use-wait_event_killable.patch


--
Marius



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

* Re: Bug report: AM 3-way patching fails with partial cloning
  2023-07-03 16:46 Bug report: AM 3-way patching fails with partial cloning Marius Schiffer
@ 2023-07-04 22:02 ` Junio C Hamano
  0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2023-07-04 22:02 UTC (permalink / raw)
  To: Marius Schiffer; +Cc: git

Marius Schiffer <marius@mschiffer.de> writes:

> When applying patches with git am on a repository cloned with
> filter=blob:none, the patching sometimes fails when it can't find the
> required SHA1 information.
> Applying the same thing on a normal clone works.

This is very much expected, especially if your patches are not
generated with --full-index option, because partial clones cannot
on-demand request objects without knowing their full object names to
the promissor remote.  I do not offhand know if "am -3" codepath, if
the full object name is available, is arranged to trigger lazy
fetching of the objects, but nobody sane are sending patches with
the --full-index option to begin with, so that is academic, I would
say.

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

end of thread, other threads:[~2023-07-04 22:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-03 16:46 Bug report: AM 3-way patching fails with partial cloning Marius Schiffer
2023-07-04 22:02 ` 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 read-only IMAP folder(s) and NNTP newsgroup(s).