Skip to content

transports: local: fix assert when fetching into repo with symrefs#4613

Merged
pks-t merged 1 commit into
libgit2:masterfrom
pks-t:pks/local-fetch-symrefs
Apr 12, 2018
Merged

transports: local: fix assert when fetching into repo with symrefs#4613
pks-t merged 1 commit into
libgit2:masterfrom
pks-t:pks/local-fetch-symrefs

Conversation

@pks-t

@pks-t pks-t commented Apr 6, 2018

Copy link
Copy Markdown
Member

When fetching into a repository which has symbolic references via the
"local" transport we run into an assert. The assert is being triggered
while we negotiate the packfile between the two repositories. When
hiding known revisions from the packbuilder revwalk, we unconditionally
hide all references of the local refdb. In case one of these references
is a symbolic reference, though, this means we're trying to hide a
NULL OID, which triggers the assert.

Fix the issue by only hiding OID references from the revwalk. Add a test
to catch this issue in the future.

When fetching into a repository which has symbolic references via the
"local" transport we run into an assert. The assert is being triggered
while we negotiate the packfile between the two repositories. When
hiding known revisions from the packbuilder revwalk, we unconditionally
hide all references of the local refdb. In case one of these references
is a symbolic reference, though, this means we're trying to hide a
`NULL` OID, which triggers the assert.

Fix the issue by only hiding OID references from the revwalk. Add a test
to catch this issue in the future.
@pks-t pks-t added the backport label Apr 6, 2018
@pks-t pks-t merged commit c587d80 into libgit2:master Apr 12, 2018
@ethomson

Copy link
Copy Markdown
Member

Wonderful, thanks for fixing this.

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