]> Kevux Git Server - rit/commit
backfill: reject rev-list arguments that do not make sense
authorElijah Newren <newren@gmail.com>
Wed, 15 Apr 2026 23:58:00 +0000 (23:58 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 16 Apr 2026 03:32:21 +0000 (20:32 -0700)
commit6b79aee7de1ac7142707326699c3f4aa5b18cb28
treee158b05f7c4039dba492c2973e855a75acf92738
parent9f223ef1c026d91c7ac68cc0211bde255dda6199
backfill: reject rev-list arguments that do not make sense

Some rev-list options accepted by setup_revisions() are silently
ignored or actively counterproductive when used with 'git backfill',
because the path-walk API has its own tree-walking logic that bypasses
the mechanisms these options rely on:

  * -S/-G (pickaxe) and --diff-filter work by computing per-commit
    diffs in get_revision_1() and filtering commits whose diffs don't
    match.  Since backfill's goal is to download all blobs reachable
    from commits in the range, filtering out commits based on diff
    content would silently skip blobs -- the opposite of what users
    want.

  * --follow disables path pruning (revs->prune) and only makes
    sense for tracking a single file through renames in log output.
    It has no useful interaction with backfill.

  * -L (line-log) computes line-level diffs to track the evolution
    of a function or line range.  Like pickaxe, it filters commits
    based on diff content, which would cause blobs to be silently
    skipped.

  * --diff-merges controls how merge commit diffs are displayed.
    The path-walk API walks trees directly and never computes
    per-commit diffs, so this option would be silently ignored.

  * --filter (object filtering, e.g. --filter=blob:none) is used by
    the list-objects traversal but is completely ignored by the
    path-walk API, so it would silently do nothing.

Rather than letting users think these options are being honored,
reject them with a clear error message.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/backfill.c