[flutter_plugin_tools] Add 'main' support#4474
Conversation
Treat `main` the same as `master` for branch-based switching, in preparation for switching the branch names in Flutter repositories. Also updates all of the tests that used `master` as the explicit base to use `main` instead; what the tests use is arbitrary, so they can be switched now even though the repo itself hasn't switched. Part of flutter/flutter#90476
| } | ||
| } else { | ||
| final GitVersionFinder gitVersionFinder = await retrieveVersionFinder(); | ||
| previousVersionSource = await gitVersionFinder.getBaseSha(); |
There was a problem hiding this comment.
This is a logical change since getBaseSha() isn't necessarily master (or main), right? This sounds like the correct thing to do. It might be worth mentioning this a bit more explicitly in the description in case it does cause some problems.
There was a problem hiding this comment.
This is a logical change since getBaseSha() isn't necessarily
master(ormain), right?
In that the error logging was wrong before, and now isn't, yes. getBaseSha() is what the code that populates previousVersion actually uses; the error logging on failure (which is all this is used for) was incorrectly hard-coding that to master. In practice, in presubmit, it's the same thing, so it hadn't been noticed.
It might be worth mentioning this a bit more explicitly in the description in case it does cause some problems.
It would only be a problem if something were parsing human-targeted error output (which we aren't, and we only guarantee this tool's behavior for our use currently), and relying on the exact output, and were using a base revision other than master.
Treat `main` the same as `master` for branch-based switching, in preparation for switching the branch names in Flutter repositories. Also updates all of the tests that used `master` as the explicit base to use `main` instead; what the tests use is arbitrary, so they can be switched now even though the repo itself hasn't switched. Part of flutter/flutter#90476
Treat `main` the same as `master` for branch-based switching, in preparation for switching the branch names in Flutter repositories. Also updates all of the tests that used `master` as the explicit base to use `main` instead; what the tests use is arbitrary, so they can be switched now even though the repo itself hasn't switched. Part of flutter/flutter#90476
Treat
mainthe same asmasterfor branch-based switching, inpreparation for switching the branch names in Flutter repositories.
Also updates all of the tests that used
masteras the explicit base touse
maininstead; what the tests use is arbitrary, so they can beswitched now even though the repo itself hasn't switched.
Part of flutter/flutter#90476
Pre-launch Checklist
dart format.)[shared_preferences]///).