Skip to content

Commit d7ac0e0

Browse files
marc-hbMaureenHelm
authored andcommitted
doc: west: add note about west update --keep-descendants option
The previous and short description wasn't enough for me to understand the interesting trade-off of --keep-descendants, thanks to @mbolivar-nordic for clarifying this on Slack. For reference this option was added in west commit 11b8588303 part of zephyrproject-rtos/west#165 Signed-off-by: Marc Herbert <[email protected]>
1 parent 220316c commit d7ac0e0

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

doc/guides/west/repo-tool.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,28 @@ If you would like ``west update`` to keep local branches checked out as
257257
long as they point to commits that are descendants of the new
258258
``manifest-rev``, use the ``-k`` (``--keep-descendants``) option.
259259

260+
.. note::
261+
262+
``west update --rebase`` will fail in projects that have git conflicts
263+
between your branch and new commits brought in by the manifest. You
264+
should immediately resolve these conflicts as you usually do with
265+
``git``, or you can use ``git -C <project_path> rebase --abort`` to
266+
ignore incoming changes for the moment.
267+
268+
With a clean working tree, a plain ``west update`` never fails
269+
because it does not try to hold on to your commits and simply
270+
leaves them aside.
271+
272+
``west update --keep-descendants`` offers an intermediate option that
273+
never fails either but does not treat all projects the same:
274+
275+
- in projects where your branch diverged from the incoming commits, it
276+
does not even try to rebase and leaves your branches behind just like a
277+
plain ``west update`` does;
278+
- in all other projects where no rebase or merge is needed it keeps
279+
your branches in place.
280+
281+
260282
.. _west-multi-repo-misc:
261283

262284
Other Repository Management Commands

0 commit comments

Comments
 (0)