Merge pull request #2818 from errordeveloper/master

Improve error message for new packages
This commit is contained in:
Ian Campbell 2017-12-19 11:04:08 +00:00 committed by GitHub
commit a7e7a39f89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -89,6 +89,10 @@ func (g git) treeHash(pkg, commit string) (string, error) {
return "", err
}
if out == "" {
return "", fmt.Errorf("Package %s is not in git", pkg)
}
matches := treeHashRe.FindStringSubmatch(out)
if len(matches) != 2 {
return "", fmt.Errorf("Unable to parse ls-tree output: %q", out)