File tree 1 file changed +12
-11
lines changed
1 file changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -701,18 +701,19 @@ subrepo:branch() {
701
701
702
702
o " Subrepo parent: $subrepo_parent "
703
703
704
- # Check if the subrepo parent is an ancestor of HEAD.
705
- # For example rebasing the commit that touched the subrepo
706
- # could make the commit no longer match.
707
- local parent_is_ancestor=
708
- git merge-base --is-ancestor " $subrepo_parent " HEAD && parent_is_ancestor=" true"
709
- if [[ -z " $parent_is_ancestor " ]]; then
710
- error " The previous commit where the subrepo was updated, '$subrepo_parent ' is not an ancestor of HEAD. \n \
711
- Did you rebase that commit?\n \
712
- Try manually setting subrepo.parent in .gitrepo to the hash of the correct commit."
713
- fi
714
-
715
704
if [[ -n " $subrepo_parent " ]]; then
705
+
706
+ # Check if the subrepo parent is an ancestor of HEAD.
707
+ # For example rebasing the commit that touched the subrepo
708
+ # could make the commit no longer match.
709
+ local parent_is_ancestor=
710
+ git merge-base --is-ancestor " $subrepo_parent " HEAD && parent_is_ancestor=" true"
711
+ if [[ -z " $parent_is_ancestor " ]]; then
712
+ error " The previous commit where the subrepo was updated, '$subrepo_parent ' is not an ancestor of HEAD. \n \
713
+ Did you rebase that commit?\n \
714
+ Try manually setting subrepo.parent in .gitrepo to the hash of the correct commit."
715
+ fi
716
+
716
717
local prev_commit=
717
718
local ancestor=
718
719
o " Create new commits with parents into the subrepo fetch"
You can’t perform that action at this time.
0 commit comments