Skip to content
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

Fix error "fatal: Not a valid object name: ''." #498

Closed
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: 7 additions & 1 deletion lib/git-subrepo
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,13 @@ subrepo:branch() {
fi
done

o "Create branch '$branch' for this new commit set $prev_commit."
if [[ -z "$prev_commit" ]]; then # i.e. there are no new reachable commits
o "Create branch '$branch' for subrepo commit $subrepo_commit."
prev_commit="$subrepo_commit"
first_gitrepo_commit="$subrepo_commit" # force neutralization of $filter to avoid unnecessary large range (see below)
else
o "Create branch '$branch' for this new commit set $prev_commit."
fi
RUN git branch "$branch" "$prev_commit"
else
o "No parent setting, use the subdir content."
Expand Down