Improve error message for new packages
@@ -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)
