gh-156064: Make patchcheck find the upstream remote in a partial clone - #156065
Open
ekanshul wants to merge 2 commits into
Open
gh-156064: Make patchcheck find the upstream remote in a partial clone#156065ekanshul wants to merge 2 commits into
ekanshul wants to merge 2 commits into
Conversation
…l clone Since Git 2.37, ``git remote -v`` appends the object filter of a promisor remote to its fetch line (``... (fetch) [blob:none]``), so matching ``(fetch)`` at the end of the line missed the upstream remote of a partial clone, and also left it out of the "Remotes found" list in the error.
|
The following commit authors need to sign the Contributor License Agreement: |
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since Git 2.37 (git/git@ef6d15ca53),
git remote -vappends the object filter of a promisor remote to its fetch line:get_git_upstream_remote()kept fetch lines withremote.endswith("(fetch)"), so in a partial clone theupstreamremote was neither considered nor listed in the "Remotes found" part of the error, andmake patchcheckfailed with a misleading message. This matches"(fetch)"anywhere on the line instead and reuses the same filtered list for the error message.Verified in a
--filter=blob:noneclone withorigin(fork) andupstream(python/cpython) remotes:make patchchecknow reportsGetting base branch for PR ... upstream/maininstead of raising.No NEWS entry, as for #135806 (developer tooling).