Fix branch syncing bug around git town propose --stack command#5973
Fix branch syncing bug around git town propose --stack command#5973kevgo merged 1 commit intogit-town:mainfrom
git town propose --stack command#5973Conversation
|
Thanks for fixing this, @meowsus! 🙏 Yep, the fix itself is pretty straightforward: when running I was planning to land the new proposal-creation test framework before addressing this bug, but you beat me to it, which is excellent news 🙂 The test failures happen because a few other end-to-end tests now also check out the branch before proposing it, so they'll need to be updated to match the new behavior. You can run |
| prog.Value.Add(&opcodes.BranchTrackingCreateIfNeeded{ | ||
| CurrentBranch: branchToPropose.name, | ||
| }) | ||
| prog.Value.Add(&opcodes.CheckoutIfNeeded{Branch: branchToPropose.name}) |
There was a problem hiding this comment.
Nice use of the CheckoutIfNeeded opcode here! This avoids unnecessary checkouts when the branch is already active
|
Awesome that this bug is valid. Yesterday I used stack proposals twice and the bug didn't manifest itself, which caused me to second guess this bugfix. I thought that maybe I hadn't been upgraded to the latest version (v22.4.0) before when I last saw it, but I remembered that I started seeing the prompt to run I'm updating the tests now :) |
7f306a3 to
6c67ca8
Compare
6c67ca8 to
de76014
Compare
|
Thanks so much for fixing this! 👍 |
|
Thanks so much for making the only viable, free, and open-source alternative to Graphite, in my opinion! |
|
This is available in v22.5. |
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [git-town/git-town](https://github.com/git-town/git-town) | minor | `v22.4.0` → `v22.5.0` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>git-town/git-town (git-town/git-town)</summary> ### [`v22.5.0`](https://github.com/git-town/git-town/releases/tag/v22.5.0) [Compare Source](git-town/git-town@v22.4.0...v22.5.0) ##### New Features - The Git Town CLI can now embed breadcrumbs in proposals. This helps reviewers understand where a branch sits in a stack. Enable it via the new `proposal-breadcrumb` setting and choose between `stacks` or `branches` ([docs](https://www.git-town.com/preferences/proposal-breadcrumb.html), [#​3003](git-town/git-town#3003)). - Added `git-town commit`, a new command that lets you commit changes from your current branch directly into an ancestor branch and then syncs those changes back into your current branch. This makes it much easier to work on complex, cross-cutting changes in one place while committing each part to the correct branch in your stack ([#​5760](git-town/git-town#5760)). ##### Bug Fixes - Fixed `git-town detach` to correctly handle branches with multiple children ([#​5988](git-town/git-town#5988)). - Fixed `git-town propose --stack` to properly sync branches before proposing ([#​5973](git-town/git-town#5973)). ##### Contribution branches Huge thanks to [@​AlexanderCiridae](https://github.com/AlexanderCiridae), [@​JaredSharplin](https://github.com/JaredSharplin), [@​ceilfors](https://github.com/ceilfors), [@​cjol](https://github.com/cjol), [@​davidolrik](https://github.com/davidolrik), [@​haltcase](https://github.com/haltcase), [@​kevgo](https://github.com/kevgo), [@​meowsus](https://github.com/meowsus), [@​mrmarufpro](https://github.com/mrmarufpro), [@​mw00120](https://github.com/mw00120), [@​nemith](https://github.com/nemith), [@​oleg-codaio](https://github.com/oleg-codaio), [@​ruudk](https://github.com/ruudk), [@​stephenwade](https://github.com/stephenwade), [@​towry](https://github.com/towry), [@​tranhl](https://github.com/tranhl), [@​yaadata](https://github.com/yaadata), [@​zodman](https://github.com/zodman) for contributing code, ideas, and feedback to 122 shipped pull requests and 5 resolved issues! </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi45Mi40IiwidXBkYXRlZEluVmVyIjoiNDIuOTIuNCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90IiwiYXV0b21hdGlvbjpib3QtYXV0aG9yZWQiLCJkZXBlbmRlbmN5LXR5cGU6Om1pbm9yIl19-->
Hey @kevgo! I finally got a second to attempt to fix the issue I reported here: #5865 (and that you helped fix here). Turns out it was just an OOO issue, but I added a test case to prove to myself that it was actually happening. Give it a whirl and let me know what you think :)