Let's execute the
infocommand again to see the current state of the workspace:
At the top we have the line
stable since: c91fdad(you most likely have another git SHA/hash). To explain what this is, let's take it from the beginning.
If we pass in
:commitwhen a Polylith workspace is created, these
gitcommands are executed:
git add .
git commit -m "Workspace created."
If we don't pass in
create workspacecommand, then we have to perform these (or similar) commands manually.
If we run
git logfrom the workspace root, it returns something like this:
This is the first and only commit of this repository so far. This is also the first
stable point in timeof this workspace which the tool uses when it calculates what changes have been made (up till now). Notice that the first letters of the hash correspond to
stable since: c91fdadand this is because it refers to this SHA-1 hash in git.
developmentprojects, and the
clibricks are all marked with an asterisk,
*. The way the tool calculates changes is to ask
gitby running this command internally:
git diff c91fdad4a34927d9aacfe4b04ea2f304f3303282 --name-only
Here we have the answer to where the
*signs come from. The paths that start with
bases/cli/makes the tool understand that
Let's add and commit the changed files:
git add --all
git commit -m "Created the user and cli bricks."
Let's have a look at our workspace repository again:
git log --pretty=oneline
e7ebe683a775ec28b7c2b5d77e01e79d48149d13 (HEAD -> main) Created the user and cli bricks.
c91fdad4a34927d9aacfe4b04ea2f304f3303282 Workspace created.
If we run the
infocommand again, it will return the same result as before, and the reason is that we haven't told git to move the
stable point in timeto our second commit.
We said that the
diffcommand returns the same result as
git diff SHA --name-only. This i normally true, except for the case when the workspace lives inside a git repo. In that case, the
git diffcommand will also return the workspace directory in the path (which is stripped away by the
polytool). This directory can be shown by running the
poly ws get:ws-local-dircommand.