+5
-1
knotserver/git/git.go
+5
-1
knotserver/git/git.go
···
230
if err != nil {
231
return "", fmt.Errorf("unable to find main branch: %w", err)
232
}
233
+
if ref.Name().IsBranch() {
234
+
return strings.TrimPrefix(string(ref.Name()), "refs/heads/"), nil
235
+
}
236
+
237
+
return "", fmt.Errorf("unable to find main branch: %w", err)
238
}
239
240
// WriteTar writes itself from a tree into a binary tar file format.