[flutter_tools] Remove usage of globals.flutterGit from version#100744
[flutter_tools] Remove usage of globals.flutterGit from version#100744fluttergithubbot merged 2 commits intoflutter:masterfrom
Conversation
There was a problem hiding this comment.
Removed this message as the user will hit a similar error message when they try to upgrade, and in the case FLUTTER_GIT_URL is set incorrectly, the upstream of the current channel has to be exactly the same for the tool to arrive at this point.
There was a problem hiding this comment.
This is a good change; however, I always need to look up @{u}. Can you make this a constant, like:
/// A git shortcut for the branch that is being tracked by the current one.
///
/// See `man gitrevisions` for more information.
const String kGitTrackingUpstream = '@{upstream}';There was a problem hiding this comment.
So it sounds like git fetch, without an explicit remote, defaults to whatever remote the current branch is tracking?
There was a problem hiding this comment.
If so, please leave a comment.
There was a problem hiding this comment.
So it sounds like
git fetch, without an explicit remote, defaults to whatever remote the current branch is tracking?
Yes, provided the current branch tracks the said remote. Otherwise remote origin is fetched.
The tool won't go to the second case ever, since in that case repositoryUrl will be null and will fail this check.
Although I only mentioned that the tool fetches from upstream, I wouldn't necessarily object if you would like to have the above info included as well.
7135fa8 to
933530e
Compare
3ebc203 to
5a10d36
Compare
5a10d36 to
5d850e4
Compare
Removes
globals.flutterGitand its usage in version.Now that the tool only uses
FLUTTER_GIT_URLorgithub.com/flutter/flutterfor version freshness check and updates(#97202 and #100605), we don't need to create the temporary remote anymore; instead use the tracking remote itself to fetch from upstream.Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.