Skip to content

Failure to resolve deltas when PlainClone or Fetching from a new AWS CodeCommit repository #391

Closed
@ga-paul-t

Description

@ga-paul-t

When attempting to clone a newly created repository in AWS CodeCommit, that for example only contains a single commit, the following error is encountered:

reference delta not found

The following code is used to perform the clone:

repo, err := git.PlainClone(dir, false, &git.CloneOptions{
    URL:           url,
    ReferenceName: plumbing.NewBranchReferenceName("main"),
    Tags:          git.AllTags,
    SingleBranch:  true,
    Depth:         1,
})

I never encounter this issue when cloning from another source control system like Github

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions