Skip to content

Commit

Permalink
Fix git subrepo status command for subrepos that share a common prefix.
Browse files Browse the repository at this point in the history
  • Loading branch information
cciocov authored and mahmoudimus committed Mar 16, 2022
1 parent b7c0a1c commit a36db4c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/git-subrepo
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,7 @@ subrepo:status() {
local _worktree
_worktree=$(
git worktree list |
grep "$GIT_TMP/subrepo/$subdir"
grep "$GIT_TMP/subrepo/$subdir "
) || true
if [[ $_worktree ]]; then
echo " Worktree: $_worktree"
Expand Down Expand Up @@ -1568,7 +1568,7 @@ get-all-subrepos() {
add-subrepo() {
if ! $ALL_wanted; then
for path in "${subrepos[@]}"; do
[[ $1 =~ ^$path ]] && return
[[ $1 =~ ^$path/ ]] && return
done
fi
subrepos+=("$1")
Expand Down

0 comments on commit a36db4c

Please sign in to comment.