Skip to content

Commit

Permalink
feat: add tests and export capabilities and protocol version
Browse files Browse the repository at this point in the history
  • Loading branch information
aymanbagabas committed Oct 27, 2023
1 parent 7aa2d62 commit c525d19
Show file tree
Hide file tree
Showing 10 changed files with 611 additions and 66 deletions.
9 changes: 1 addition & 8 deletions cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,6 @@ import (
"github.com/rubyist/tracerx"
)

var (
capabilities = []string{
"version=1",
"locking",
}
)

func ensureDirs(path string) error {
for _, dir := range []string{
"objects", "incomplete", "tmp", "locks",
Expand Down Expand Up @@ -51,7 +44,7 @@ func run(r io.Reader, w io.Writer, args ...string) error {
}
umask := setPermissions(gitdir)
handler := transfer.NewPktline(r, w, logger)
for _, cap := range capabilities {
for _, cap := range transfer.Capabilities {
if err := handler.WritePacketText(cap); err != nil {
logger.Log("error sending capability", "cap", cap, "err", err)
}
Expand Down
Loading

0 comments on commit c525d19

Please sign in to comment.