Skip to content

Commit ba23105

Browse files
david-beaumontshipilev
authored andcommitted
8365048: idea.sh script does not correctly detect/handle git worktrees
Reviewed-by: shade, vyazici, erikj, mcimadamore, ihse
1 parent 26ccb3c commit ba23105

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

bin/idea.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ if [ -d "$TOPLEVEL_DIR/.hg" ] ; then
125125
VCS_TYPE="hg4idea"
126126
fi
127127

128-
if [ -d "$TOPLEVEL_DIR/.git" ] ; then
128+
# Git worktrees use a '.git' file rather than directory, so test both.
129+
if [ -d "$TOPLEVEL_DIR/.git" -o -f "$TOPLEVEL_DIR/.git" ] ; then
129130
VCS_TYPE="Git"
130131
fi
131132

0 commit comments

Comments
 (0)