Skip to content

Commit 5a6c3c2

Browse files
Totalusadmorgan
authored andcommitted
Bugfix: Missing refs not removed properly when using clean with --force
1 parent feac147 commit 5a6c3c2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/git-subrepo

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,6 +1026,11 @@ subrepo:clean() {
10261026
git update-ref -d "$ref"
10271027
fi
10281028
done
1029+
git show-ref | while read -r hash ref; do
1030+
if [[ $ref == "refs/original/refs/heads/subrepo/$suffix"* ]]; then
1031+
git update-ref -d "$ref"
1032+
fi
1033+
done
10291034
fi
10301035
}
10311036

0 commit comments

Comments
 (0)