Conversation
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.
Every fetch, push and remote-tracking ref was spelled
originliterally, so a clonewhose remote is called anything else -
git clone -o github, or an origin that wasrenamed - failed on each of them. The failures were quiet: the start page caught them
and showed an empty branch list, or a list whose merged and ahead labels were silently
missing, and the reader had nothing to go on.
The remote is now resolved once per repository, in
GitService.GetRemoteAsync:checkout.defaultRemotefirst, because that is the reader saying so and git's ownsetting for it; then
origin, which is what a clone calls the place it came from; thenthe only remote, if there is one; then the remote the checked-out branch tracks. git's
existing config is used rather than a switch of our own - a reader with several remotes
has usually already told git which is meant.
When none of that decides, the operation fails with a sentence that says how to choose,
instead of a git error about an unknown revision. A failed lookup is not cached, so the
next refresh sees a remote that has since been added or configured.
The start page now reads what is local - branches, stashes, worktrees - before anything
that needs the remote, so a clone that cannot name one still lists its branches, with
the reason above them; the reload path reports it too rather than swallowing it. Status
lines, menu items and tooltips no longer promise "origin" for a remote called something
else.
Tests cover the choosing order as a pure function, and a real clone whose remote is
called
github: fetch, default base and push all go to it, and both refusals - noremote, and several with nothing to choose by - are asserted on their messages.