@@ -787,7 +787,7 @@ subrepo:branch() {
787
787
o " No parent setting, use the subdir content."
788
788
RUN git branch " $branch " HEAD
789
789
TTY=true FAIL=false RUN git filter-branch -f --subdirectory-filter \
790
- " $subdir " " $branch "
790
+ " $subref " " $branch "
791
791
fi
792
792
793
793
o " Remove the .gitrepo file from $first_gitrepo_commit ..$branch "
@@ -857,7 +857,7 @@ subrepo:commit() {
857
857
fi
858
858
859
859
# Clean up worktree to indicate that we are ready
860
- git:remove-worktree " $branch_name "
860
+ git:remove-worktree
861
861
862
862
o " Create ref '$refs_subrepo_commit '."
863
863
git:make-ref " $refs_subrepo_commit " " $subrepo_commit_ref "
@@ -945,11 +945,12 @@ subrepo:status() {
945
945
946
946
subrepo:clean () {
947
947
# Remove subrepo branches if exist:
948
- local branch=" subrepo/$subdir "
948
+ local branch=" subrepo/$subref "
949
949
local ref=" refs/heads/$branch "
950
+ local worktree=" $GIT_TMP /$branch "
950
951
951
952
o " Clean $subdir "
952
- git:remove-worktree " $branch "
953
+ git:remove-worktree
953
954
if [[ -e .git/$ref ]]; then
954
955
o " Remove branch '$branch '."
955
956
RUN git update-ref -d " $ref "
@@ -1750,6 +1751,7 @@ git:create-worktree() {
1750
1751
}
1751
1752
1752
1753
git:remove-worktree () {
1754
+ o " Remove $worktree "
1753
1755
if [[ -d " $worktree " ]]; then
1754
1756
o " Check worktree for unsaved changes"
1755
1757
cd " $worktree "
@@ -1766,7 +1768,7 @@ git:delete-branch() {
1766
1768
local branch=" $1 "
1767
1769
o " Deleting old '$branch_name ' branch."
1768
1770
# Remove worktree first, otherwise you can't delete the branch
1769
- git:remove-worktree " $branch "
1771
+ git:remove-worktree
1770
1772
FAIL=false RUN git branch -D " $branch "
1771
1773
}
1772
1774
0 commit comments