Closed rickeylev closed 1 week ago
For posterity, here's a relatively simple git alias to create and update a local last-green branch
update-last-green = !git fetch && git branch -f last-green $(USE_BAZEL_VERSION=last_green bazel --version 2>&1 | head -1 | sed 's/.*commit //')
Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 1+ years. It will be closed in the next 90 days unless any other activity occurs. If you think this issue is still relevant and should stay open, please post any comment here and the issue will no longer be marked as stale.
This issue has been automatically closed due to inactivity. If you're still interested in pursuing this, please post @bazelbuild/triage
in a comment here and we'll take a look. Thanks!
Description of the feature request:
When building Bazel, it's not uncommon for HEAD to be broken. That it's broken isn't a big deal, but it does create a barrier to creating a new branch to work on something -- sometimes it works OK, sometimes it doesn't.
It'd be nice if a "last-green" branch was created that was automatically updated to match the commit that bazelisk uses for
USE_BAZEL_VERSION=last_green
. Then I could simply start a branch tracking upstream/last-green, and git pull and friends would automatically pull in any updates.I've been working around this manually by running
USE_BAZEL_VERSION=last_green
, looking for the commit hash it prints, then manually starting a branch at that commit. It works, but its clunky, and I later have to manually rebase atop a newer commit, which is a hassle.What underlying problem are you trying to solve with this feature?
Making it easier to get started hacking on Bazel.
Which operating system are you running Bazel on?
n/a
What is the output of
bazel info release
?n/a
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.n/a
What's the output of
git remote get-url origin; git rev-parse master; git rev-parse HEAD
?Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response