Skip to content

Commit 43fd7c3

Browse files
committed
Remove UploadArchive
1 parent 9145420 commit 43fd7c3

File tree

2 files changed

+0
-25
lines changed

2 files changed

+0
-25
lines changed

server.go

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -111,27 +111,3 @@ func UploadPack(path string, opts ...UploadPackOptions) ([]byte, error) {
111111
cmd.AddArgs(".")
112112
return cmd.RunInDirWithTimeout(opt.Timeout, path)
113113
}
114-
115-
// UploadArchiveOptions contains optional arguments for sending the archive to
116-
// the client.
117-
//
118-
// Docs: https://git-scm.com/docs/git-upload-archive
119-
type UploadArchiveOptions struct {
120-
// The timeout duration before giving up for each shell command execution. The
121-
// default timeout duration will be used when not supplied.
122-
Timeout time.Duration
123-
// The additional options to be passed to the underlying git.
124-
CommandOptions
125-
}
126-
127-
// UploadArchive sends the archive to the client for the repository in given
128-
// path.
129-
func UploadArchive(path string, opts ...UploadArchiveOptions) ([]byte, error) {
130-
var opt UploadArchiveOptions
131-
if len(opts) > 0 {
132-
opt = opts[0]
133-
}
134-
cmd := NewCommand("upload-archive").AddOptions(opt.CommandOptions)
135-
cmd.AddArgs(".")
136-
return cmd.RunInDirWithTimeout(opt.Timeout, path)
137-
}

server_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,3 @@ func TestUploadPack(t *testing.T) {
4040
const contains = "multi_ack thin-pack side-band side-band-64k ofs-delta shallow deepen-since deepen-not deepen-relative no-progress include-tag multi_ack_detailed no-done symref=HEAD:refs/heads/master object-format=sha1 agent=git/"
4141
assert.Contains(t, string(got), contains)
4242
}
43-

0 commit comments

Comments
 (0)