Skip to content

Commit a53e7a7

Browse files
author
Francesco Placella
committed
Fix #313: Ensured "-u" options is respected by "subrepo:push()".
1 parent ba19aa7 commit a53e7a7

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

lib/git-subrepo

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -664,11 +664,13 @@ subrepo:push() {
664664
git:delete-branch "$branch_name"
665665
fi
666666

667-
o "Put updates into '$subdir/.gitrepo' file."
668-
upstream_head_commit="$new_upstream_head_commit"
669-
subrepo_commit_ref="$upstream_head_commit"
670-
update-gitrepo-file
671-
RUN git commit -m "$(get-commit-message)"
667+
if $update_wanted; then
668+
o "Put updates into '$subdir/.gitrepo' file."
669+
upstream_head_commit="$new_upstream_head_commit"
670+
subrepo_commit_ref="$upstream_head_commit"
671+
update-gitrepo-file
672+
RUN git commit -m "$(get-commit-message)"
673+
fi
672674
}
673675

674676
# Fetch the subrepo's remote branch content:

0 commit comments

Comments
 (0)