You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix PRESUBMIT.py issue with manual presubmit invocations
I've been experimenting with using the Jj source control tool, and
since it's not natively supported by `depot_tools`, this means I have
to manually invoke `git cl presubmit`. `git cl presubmit` accepts a
single argument which is the name of the upstream branch.
The way this is intended to work is that the upstream branch name gets
passed into the `PRESUBMIT.py` scripts, and they use it rather than
making assumptions about what the upstream branch is.
Prior to this change, our presubmit scripts for _fe_analyzer_shared,
front_end, frontend_server, and kernel were ignoring the upstream
branch and instead using git's `@{u}` shorthand (see
https://git-scm.com/docs/git-rev-parse). This caused them to behave
strangely when no upstream branch is set, which sometimes happens when
running `git cl presubmit` manually.
This change avoids the strange behavior by getting the upstream branch
from the input to `PRESUBMIT.py`, as intended.
Change-Id: I6a6a696423221d7b945b083fd72585f1f5a7e312
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/447626
Reviewed-by: Konstantin Shcheglov <[email protected]>
Commit-Queue: Paul Berry <[email protected]>
0 commit comments