8365048: idea.sh script does not correctly detect/handle git worktrees

Reviewed-by: shade, vyazici, erikj, mcimadamore, ihse
This commit is contained in:
David Beaumont 2025-08-14 17:02:05 +00:00 committed by Aleksey Shipilev
parent 26ccb3cef1
commit ba23105231

View File

@ -125,7 +125,8 @@ if [ -d "$TOPLEVEL_DIR/.hg" ] ; then
VCS_TYPE="hg4idea" VCS_TYPE="hg4idea"
fi fi
if [ -d "$TOPLEVEL_DIR/.git" ] ; then # Git worktrees use a '.git' file rather than directory, so test both.
if [ -d "$TOPLEVEL_DIR/.git" -o -f "$TOPLEVEL_DIR/.git" ] ; then
VCS_TYPE="Git" VCS_TYPE="Git"
fi fi