Skip to content

dist/tools/ci/print_toolchain_versions.sh: also support git worktrees#22112

Open
mguetschow wants to merge 1 commit intoRIOT-OS:masterfrom
mguetschow:print-versions-worktree
Open

dist/tools/ci/print_toolchain_versions.sh: also support git worktrees#22112
mguetschow wants to merge 1 commit intoRIOT-OS:masterfrom
mguetschow:print-versions-worktree

Conversation

@mguetschow
Copy link
Copy Markdown
Contributor

Contribution description

Inside git worktrees, .git is not a folder, but a regular file. The script currently explicitly checks for an existing folder. It is anyhow better to use git tooling to check that, so do this instead.

Testing procedure

$ git worktree add -d ../test
$ cd ../test
$ make print-versions

will print on master:

RIOT version information
----------------------------
              RIOT branch: unknown (not a git repository)
         RIOT commit hash: unknown (not a git repository)
         RIOT commit date: unknown (not a git repository)

With this PR, it works as expected, also if not in a git worktree

@github-actions github-actions Bot added the Area: tools Area: Supplementary tools label Feb 27, 2026
@mguetschow mguetschow added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Feb 27, 2026
@riot-ci
Copy link
Copy Markdown

riot-ci commented Feb 27, 2026

Murdock results

✔️ PASSED

7db49b1 dist/tools/ci/print_toolchain_versions.sh: also support git worktrees

Success Failures Total Runtime
1 0 1 01m:17s

Artifacts

@crasbe
Copy link
Copy Markdown
Contributor

crasbe commented Feb 27, 2026

The static test has a (valid) remark about your change and a very valid remark about line 57 (not your code, but still a bug). Perhaps you can address at least these two shellcheck comments?

It would be extra-kind if you also fixed the other ones while you're at it 😇

@AnnsAnns AnnsAnns added the State: waiting for author State: Action by the author of the PR is required label Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: tools Area: Supplementary tools CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR State: waiting for author State: Action by the author of the PR is required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants