fix(dotgit): set publicheads correctly for transparent git mode#969
Open
vegerot wants to merge 1 commit into
Open
fix(dotgit): set publicheads correctly for transparent git mode#969vegerot wants to merge 1 commit into
vegerot wants to merge 1 commit into
Conversation
Summary: 0ce7010 taught Sapling to use the correct public head based on the upstream default branch. However, this doesn't work when using the transparent git mode through `git clone`. This diff will correctly set the publicheads config when initializing sapling Test Plan: see test-git-clone-sets-publicheads.t
Contributor
|
@facebook-github-bot has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
strager
reviewed
Oct 22, 2024
| let config = String::from_utf8(out.stdout)?; | ||
| let remotes_out = self | ||
| .git_cmd( | ||
| "ls-remote", &["--symref", ".", "HEAD"]) |
Contributor
There was a problem hiding this comment.
This performs a network call, which might be unexpected or undesirable.
How about parsing the output of git rev-parse --symbolic refs/remotes/origin/HEAD instead?
Contributor
Author
There was a problem hiding this comment.
Good idea! If it's as robust as ls-remote then this will save a network call.
Contributor
There was a problem hiding this comment.
You can use lookup_reference to resolve the reference without the spawning process overhead.
facebook-github-bot
pushed a commit
that referenced
this pull request
Jul 10, 2025
Summary: @public 1.0.2 comes with a vulnerable idna. v2.5.4 Latest Revert "Normalize URL paths: convert /.//p, /..//p, and //p to p (#943)" by valenting in #999 Updates the MSRV to 1.63 required though the libc v0.2.164 dependency v2.5.3 fix: enable wasip2 feature for wasm32-wasip2 target by brooksmtownsend in #960 Fix idna tests with no_std by cjwatson in #963 Fix debugger_visualizer test failures. by valenting in #967 Add AsciiSet::EMPTY and boolean operators by joshka in #969 mention why we pin unicode-width by Manishearth in #972 refactor and add tests for percent encoding by joshka in #977 Add a test for and fix issue #974 by hansl in #975 no_std support for the url crate by domenukk in #831 Normalize URL paths: convert /.//p, /..//p, and //p to p by theskim in #943 support Hermit by m-mueller678 in #985 fix: support wasm32-wasip2 on the stable channel by brooksmtownsend in #983 Improve serde error output by konstin in #982 OSS-Fuzz: Add more fuzzer by arthurscchan in #988 Merge idna-v1x to main by hsivonen in #990 What's Changed fix: enable wasip2 feature for wasm32-wasip2 target by brooksmtownsend in #960 Fix idna tests with no_std by cjwatson in #963 Fix debugger_visualizer test failures. by valenting in #967 Add AsciiSet::EMPTY and boolean operators by joshka in #969 mention why we pin unicode-width by Manishearth in #972 refactor and add tests for percent encoding by joshka in #977 Add a test for and fix issue #974 by hansl in #975 no_std support for the url crate by domenukk in #831 Normalize URL paths: convert /.//p, /..//p, and //p to p by theskim in #943 support Hermit by m-mueller678 in #985 fix: support wasm32-wasip2 on the stable channel by brooksmtownsend in #983 Improve serde error output by konstin in #982 OSS-Fuzz: Add more fuzzer by arthurscchan in #988 Merge idna-v1x to main by hsivonen in #990 Reviewed By: dtolnay Differential Revision: D78043174 fbshipit-source-id: 93ca32d2a17f6cf3662055050ef77b1906edcdae
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.
Summary:
0ce7010 taught Sapling to use the correct public head based on the upstream
default branch. However, this doesn't work when using the transparent git mode
through
git clone.This diff will correctly set the publicheads config when initializing sapling
Test Plan: see test-git-clone-sets-publicheads.t