Skip to content

check_patch_files.py fails when a release tag is also resolved as a path #14

Description

@jpezzulli

Problem

While regenerating the v0.24 patch, I ran:

VLLM_MOET_FORK=/opt/vllm-v0.24.0 \
python3 tools/check_patch_files.py --update

The checker failed when Git resolved v0.24.0 as both a revision and a path:

fatal: ambiguous argument 'v0.24.0': both revision and filename
Use '--' to separate paths from revisions

The affected calls on current main are the two source-diff operations in tools/check_patch_files.py.

Proposed fix

Terminate the revision arguments with --:

regen = git(fork, "diff", BASE_TAG, sha, "--").stdout

and:

diff = git(fork, "diff", BASE_TAG, new, "--").stdout

After making those two changes locally, --update completed successfully:

patch file list OK (68 files)
patch source OK: byte-identical to `git diff v0.24.0 0156788a9cb8` in /opt/vllm-v0.24.0

PR #11 rewrites this checker for multiple releases but retains equivalent unseparated git diff calls. If that PR is updated, the same -- separator should be added to both production calls and to the raw-diff command in tests/test_check_patch_files.py.

A regression test can create a path named v0.25.0 alongside the v0.25.0 tag and verify that source checking and regeneration still succeed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions