]> git.ipfire.org Git - thirdparty/git.git/commit
backfill: default to grabbing edge blobs too
authorElijah Newren <newren@gmail.com>
Wed, 15 Apr 2026 23:58:02 +0000 (23:58 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 16 Apr 2026 03:32:29 +0000 (20:32 -0700)
commita1ad4a0fca14cdeb55ab9fb065551b15cafa8a4f
tree578c7754f964f89a5871ceefc408802c273e14bf
parentef6d3c94746462ec560893ed35c83df485a6344d
backfill: default to grabbing edge blobs too

Commit 302aff09223f (backfill: accept revision arguments, 2026-03-26) added
support for accepting revision arguments to backfill.  This allows users
to do things like

   git backfill --remotes ^v2.3.0

and then run many commands without triggering on-demand downloads of
blobs.  However, if they have topics based on v2.3.0, they will likely
still trigger on-demand downloads.  Consider, for example, the command

   git log -p v2.3.0..topic

This would still trigger on-demand blob loadings after the backfill
command above, because the commit(s) with A as a parent will need to
diff against the blobs in A.  In fact, multiple commands need blobs from
the lower boundary of the revision range:

   * git log -p A..B                # After backfill A..B
   * git replay --onto TARGET A..B  # After backfill TARGET^! A..B
   * git checkout A && git merge B  # After backfill A...B

Add an extra --[no-]include-edges flag to allow grabbing blobs from
edge commits.  Since the point of backfill is to prevent on-demand blob
loading and these are common commands, default to --include-edges.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-backfill.adoc
builtin/backfill.c
t/t5620-backfill.sh