]> git.ipfire.org Git - thirdparty/git.git/commit
backfill: accept revision arguments
authorDerrick Stolee <stolee@gmail.com>
Thu, 26 Mar 2026 15:14:51 +0000 (15:14 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 26 Mar 2026 16:38:06 +0000 (09:38 -0700)
commit302aff09223f81d9bd0bb496a3aea9f279d1991f
tree33d3afe7abc4bc75cf58712bdd7a2de1abc734f7
parent9b474a69390186a3c09316ca0d8ca909c6b43a79
backfill: accept revision arguments

The existing implementation of 'git backfill' only includes downloading
missing blobs reachable from HEAD. Advanced uses may desire more general
commit limiting options, such as '--all' for all references, specifying a
commit range via negative references, or specifying a recency of use such as
with '--since=<date>'.

All of these options are available if we use setup_revisions() to parse the
unknown arguments with the revision machinery. This opens up a large number
of possibilities, only a small set of which are tested here.

For documentation, we avoid duplicating the option documentation and instead
link to the documentation of 'git rev-list'.

Note that these arguments currently allow specifying a pathspec, which
modifies the commit history checks but does not limit the paths used in the
backfill logic. This will be updated in a future change.

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