diff --git a/lib/git-subrepo b/lib/git-subrepo index f213c596..954380b8 100755 --- a/lib/git-subrepo +++ b/lib/git-subrepo @@ -869,7 +869,7 @@ subrepo:branch() { local filter=$branch [[ $first_gitrepo_commit ]] && filter=$first_gitrepo_commit..$branch FAIL=false RUN git filter-branch -f --prune-empty --tree-filter \ - "rm -f .gitrepo" "$filter" + "rm -f .gitrepo" -- "$filter" --first-parent git:create-worktree "$branch"