Skip to content

Commit

Permalink
shallow repos are not supported
Browse files Browse the repository at this point in the history
  • Loading branch information
nathants committed Sep 26, 2024
1 parent 3e43eac commit 9b0b19b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,17 @@ func push(table, bucket, prefix, command string) {
if len(bundles) > 0 {
bundleTarget = hashEnd(last(bundles)) + ".." + branch
bundleName = hashEnd(last(bundles)) + ".." + hash
} else {
cmd := exec.Command("git", "log", "--format=\"%H%d\"", hash)
var stdout bytes.Buffer
cmd.Stdout = &stdout
err := cmd.Run()
if err != nil {
panic("failed to run: git log --format=\"%H%d\" " + hash)
}
if strings.Contains(stdout.String(), "grafted") {
panic("grafted repos, those created with `git clone --depth=n`, cannot be used. fetch history then try again: git fetch --unshallow")
}
}

// create bundle
Expand Down

0 comments on commit 9b0b19b

Please sign in to comment.