Skip to content

Fixed VCS detection in git worktrees#382

Open
peci1 wants to merge 1 commit into
ros-infrastructure:masterfrom
peci1:patch-1
Open

Fixed VCS detection in git worktrees#382
peci1 wants to merge 1 commit into
ros-infrastructure:masterfrom
peci1:patch-1

Conversation

@peci1

@peci1 peci1 commented Jan 13, 2026

Copy link
Copy Markdown

When running catkin_prepare_release in a Git directory which is a worktree, I get:

$ catkin_prepare_release --bump major
Prepare the source repository for a release.
Could not determine repository type of '.'

This is because the VCS detection expects .git to be a folder. However, in a worktree, this is not true.

$ file .git
.git: ASCII text

$ LANG=C ll .git
-rw-rw-r-- 1 peci1 peci1 71 Jul 16 15:03 .git

$ cat .git
gitdir: /media/data/subt/common/src/ros-utils/.git/worktrees/ros-utils

This PR fixes the detection. I'm not sure what unexpected consequences it can have, but I guess quite minor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant