Skip to content

Fixes edge case with subrepo push failing on rebase #485

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/git-subrepo
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Options:
h Show the command summary
help Help overview
version Print the git-subrepo version number

a,all Perform command on all current subrepos
A,ALL Perform command on all subrepos and subsubrepos
b,branch= Specify the upstream branch to push/pull/fetch
Expand All @@ -77,7 +77,7 @@ file= Specify a commit message file
r,remote= Specify the upstream remote to push/pull/fetch
s,squash Squash commits on push
u,update Add the --branch and/or --remote overrides to .gitrepo

q,quiet Show minimal output
v,verbose Show verbose output
d,debug Show the actual commands used
Expand Down Expand Up @@ -788,8 +788,8 @@ subrepo:branch() {
[[ $prev_commit ]] && first_parent=(-p "$prev_commit")
second_parent=()
if [[ -z $first_gitrepo_commit ]]; then
first_gitrepo_commit=$gitrepo_commit
second_parent=(-p "$gitrepo_commit")
first_gitrepo_commit=$subrepo_commit
second_parent=(-p "$subrepo_commit")
fi

if [[ $join_method != rebase ]]; then
Expand Down