Git development
 help / color / mirror / Atom feed
* [Outreachy] fast-import: Use repo_for_each_pack() for duplicate checks
@ 2026-11-06 17:44 Joie Joie
  2026-11-09  7:35 ` Patrick Steinhardt
  0 siblings, 1 reply; 3+ messages in thread
From: Joie Joie @ 2026-11-06 17:44 UTC (permalink / raw)
  To: Usman Akinyemi, christian.couder, Patrick Steinhardt, git

Hi Patrick,

I was looking through `fast-import.c` and noticed that both
`store_object()` and `stream_blob()` still loop through `files->dirs`
to check whether an object is already in a pack.

I saw that Git already has `repo_for_each_pack()`, which is used in
places like `count-objects.c` and `pack-objects.c`.

Would it be worth using that iterator in these two places instead? The
idea would be to avoid accessing the files backend directly while
keeping the current packed-object lookup and duplicate-handling
behavior unchanged.

I haven't made any changes yet. I wanted to get your thoughts first
and check whether this would be a useful follow-up in the current
refactoring work.

Thanks!
Joy

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

end of thread, other threads:[~2026-11-09 15:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-06 17:44 [Outreachy] fast-import: Use repo_for_each_pack() for duplicate checks Joie Joie
2026-11-09  7:35 ` Patrick Steinhardt
2026-11-09 15:25   ` Karthik Nayak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox