Skip to content

Commit 4851645

Browse files
mbolivarkartben
authored andcommitted
doc: the west workspace topdir is not a git repository
It's a design decision that the west workspace "topdir" (that is, the top level directory containing the .west directory), is not itself a git repository. This exists to give us some breathing room to make changes to the workspace which would otherwise potentially cause breakage if the entire workspace is in .git. While this has always been the case, I'm documenting this now because I reviewed a PR today that flipped my bit from "this is a question to answer on a case by case basis" to "this is a frequently enough asked question that I want to be able to link people to the answer": zephyrproject-rtos/zephyr#84305 We can debate the wisdom of this design decision (and, informally, I've always tried to avoid breaking these setups), but IMO it's too late to try to change this in west. Make it explicit in the docs that you're on your own if you try this. Signed-off-by: Martí Bolívar <[email protected]>
1 parent 1f960cc commit 4851645

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

doc/develop/west/workspaces.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,3 +321,25 @@ v2.5.0 and its modules, then add the ``app1`` and ``app2`` projects:
321321
322322
You can also do this "by hand" by copy/pasting :file:`zephyr/west.yml`
323323
as shown :ref:`above <west-t2>` for the T2 topology, with the same caveats.
324+
325+
.. _workspace-as-git-repo:
326+
327+
Not supported: workspace topdir as .git repository
328+
**************************************************
329+
330+
Some users have asked for support making the workspace :ref:`topdir
331+
<west-workspace>` a git repository, like this example:
332+
333+
.. code-block:: none
334+
335+
my-workspace/ # workspace topdir
336+
├── .git/ # puts the entire workspace in a git repository
337+
├── .west/ # marks the location of the topdir
338+
└── [ ... other projects ...]
339+
340+
This is **not** an officially supported topology. As a design decision, west
341+
assumes that the workspace topdir itself is not a git repository.
342+
343+
You may be able to make something like this "work" for yourself and your own
344+
goals. However, future versions of west might contain changes which can "break"
345+
your setup.

0 commit comments

Comments
 (0)