-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New "west rebase" command? Decompose 'west update -r' into 'update' + '-r' #338
Comments
As discussed on Slack, a reasonable requirement for this new |
@tejlmand has separately suggested a We can debate that command in a separate issue if you prefer your solution. However, |
OK, so the answer to this Anyone seeing a pattern? :-) But wait, there's a related Rephrasing my 20 November suggestion in #337: can we have a generic
UPDATE: @mbolivar resumed that discussion in #337 at the exact same time I posted this. |
Depending on its semantics I agree some kind of Did @tejlmand suggest this on github? I couldn't find it. |
BTW |
Sincere thanks to @mbolivar and @tejlmand for helping brainstorm and sanity check this on Slack. Note helping is not endorsing :-)
As the the west equivalent of
git pull --rebase
,west update -r
is a very convenient command that does a lot at once. However it has a few of gaps compared togit pull --rebase
. This request is not about eliminating but rather mitigating one of these gaps. More specifically, it's about adding a new command or option performing something somewhat similar to what-r
already adds towest update
, so users can "divide and conquer"west update -r
into two consecutive commands.The name
west rebase
may be used as a placeholder for this new command or option. Feel free to suggest better names but please don't bikeshed them until the detailed behavior of the feature has been fully defined and approved (if ever).A specific use case where this new command would help is:
For instance: refactoring some cross-repo API like a CMake API.
Another use case is: west developers working on
west update -r
itself.Neither should admittedly be a very common use case and I can't think of other ones so please prioritize accordingly.
Relevant git rebase background
(west-free section)
As it performs multiple things at once
git pull --rebase
is very convenient... when it succeeds without conflict. When it fails, there are basically two approaches depending on the magnitude of conflicts:--continue
. When the number of conflicting lines is perceived as small, the user will typically persist and try to resolve them. Perform some testing and then usegit rebase --continue
.When the conflicts are large, a feeling of drowning/getting lost in a vast amount of new code is typical and normal. Fortunately,
git rebase --abort
lets the user cancel (almost) the entire operation and reconsider.rebase --abort
is a safety net that lets users take risks with the strong confidence that they can take a big bet on what happened upstream and easily fall back on slower approaches when they lose the bet. From experience, these slower approaches all involve some form of "divide and conquer". Rebasing or merging is combining multiple things together and there's a finite number of things the human brain can focus on simultaneously. Divide and conquer examples:Back to west 0.6.3
git pull --rebase
. This increases the complexity and the chances of the user getting lost in new upstream code. This can also make harder to find global, consistent states that can be tested.--abort
safety net either.This
west rebase
proposal is focused on addressing 2 and nothing else. Some sort(s) ofwest update --abort
feature(s) would be very interesting. It has already been discussed in issue #81 and other places. However this particular github issue is NOT about --abort. It's about something simpler and hopefully much easier to achieve: the ability to divide and conquerwest rebase -r
into two steps: A.west update
B. something similar to-r
. It assumes the user either anticipated the conflicts and didn't take the bet, or that she found some other way to --abort.PS: even without
-r
,west update
can already conflict.cc:
The text was updated successfully, but these errors were encountered: