Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

Fix an edge case when fetching remotes with unrelated incomplete history. Fixes #1151 #1152

Open
NonLogicalDev wants to merge 1 commit into src-d:master
base: master
Choose a base branch
Loading
from NonLogicalDev:fix/fetch-unrelated-remotes

Conversation

@NonLogicalDev
Copy link

@NonLogicalDev NonLogicalDev commented May 17, 2019
edited
Loading

In getHaves, allow the getHavesRef to fail with object not found when
iterating over incomplete history, and don't treat it as a fatal error.

It might also worth to revise the object.NewCommitPreorderIter logic,
to perhaps not fail once reachable commits are exhausted.

Fixes #1151

tshak, kwngo, and PSanetra reacted with thumbs up emoji
@NonLogicalDev NonLogicalDev force-pushed the fix/fetch-unrelated-remotes branch 2 times, most recently from 8c61d43 to 77f216e Compare May 17, 2019 01:20
...Fixes src-d#1151
In getHaves, allow the getHavesRef to fail with Object Not found when
iterating over incomplete history, and don't treat it as a fatal error.
Signed-off-by: Oleg Utkin <oleg.utkin@nonlogical.io>
Copy link
Contributor

How behaves git?

Copy link
Author

It does not error out when attempting to fetch on a shallowly cloned repository. Just checked:

git init
git remote add repo1 <url1>
git fetch repo1 --depth 1
git remote add repo2 <url2>
git fetch repo2 --depth 1 // this works in git, but equivalent fails in `go-git`

In the same situation go-git catches an error object not found when enumerating wants

Copy link
Author

@mcuadros Any update on this?

kwngo and NonLogicalDev reacted with thumbs up emoji

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

NewCommitPreorderIter Fails with object not found When iterating over incomplete history.

AltStyle によって変換されたページ (->オリジナル) /