Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

add support for git alternates #325

Closed
taralx opened this issue Apr 5, 2017 · 2 comments
Closed

add support for git alternates #325

taralx opened this issue Apr 5, 2017 · 2 comments

Comments

@taralx
Copy link
Contributor

taralx commented Apr 5, 2017

Simple test to retrieve an object from a lightweight clone results in "object not found" errors.

@taralx
Copy link
Contributor Author

taralx commented Apr 5, 2017

Steps to reproduce:

package main

import git "gopkg.in/src-d/go-git.v4"

func main() {
        r, _ := git.PlainOpen("test2")
        h, _ := r.Head()
        _, err := r.CommitObject(h.Hash())
        if err != nil {
                panic(err)
        }
}
mkdir test; cd test
git init
git commit -m "test" --allow-empty
cd ..
git clone -s test test2
cd test2
git cat-file -p HEAD
cd ..
go run t.go

Expected result: Successful run.
Actual result: panic: object not found

@smola smola changed the title objects/info/alternates not supported add support for git alternates Apr 6, 2017
@smola
Copy link
Collaborator

smola commented Apr 6, 2017

@taralx Thank you for taking the time to report this issue.

We have no immediate plans to implement alternates, but we'll be very happy to accept PRs adding support.

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

No branches or pull requests

3 participants