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

Push new remote branch on non-deep cloned repo #239

Merged
merged 6 commits into from
Jan 23, 2024

Conversation

benartuso
Copy link
Contributor

Previously, we rejected any pushes to new remote branches unless the commit history on the local branch was fully complete.

Now, if we run into this scenario, we get a list of all repo commits from the remote, then traverse the local commit history backwards from head until we find the the latest ancestor of the local head that also exists on the remote.

We then use this to calculate what commits need to be pushed, check if those commits are fully synced locally, and push if we can / error if we can't.

@benartuso benartuso requested a review from gschoeni January 22, 2024 20:27
@gschoeni gschoeni merged commit 8f12c3b into main Jan 23, 2024
@gschoeni gschoeni deleted the fix/push-new-remote-branch branch February 19, 2024 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants