From 60e258e32b5df579136ba3cf10f7f07eb8206415 Mon Sep 17 00:00:00 2001 From: Igor Date: Wed, 5 Jun 2019 15:53:33 +0000 Subject: Go implementation for git-upload-archive --- go/internal/command/commandargs/command_args.go | 1 + go/internal/command/commandargs/command_args_test.go | 7 +++++++ 2 files changed, 8 insertions(+) (limited to 'go/internal/command/commandargs') diff --git a/go/internal/command/commandargs/command_args.go b/go/internal/command/commandargs/command_args.go index 6789c5b..fd9d741 100644 --- a/go/internal/command/commandargs/command_args.go +++ b/go/internal/command/commandargs/command_args.go @@ -15,6 +15,7 @@ const ( TwoFactorRecover CommandType = "2fa_recovery_codes" ReceivePack CommandType = "git-receive-pack" UploadPack CommandType = "git-upload-pack" + UploadArchive CommandType = "git-upload-archive" ) var ( diff --git a/go/internal/command/commandargs/command_args_test.go b/go/internal/command/commandargs/command_args_test.go index c3c6ff2..7c360ad 100644 --- a/go/internal/command/commandargs/command_args_test.go +++ b/go/internal/command/commandargs/command_args_test.go @@ -83,6 +83,13 @@ func TestParseSuccess(t *testing.T) { "SSH_ORIGINAL_COMMAND": `git upload-pack "group/repo"`, }, expectedArgs: &CommandArgs{SshArgs: []string{"git-upload-pack", "group/repo"}, CommandType: UploadPack}, + }, { + desc: "It parses git-upload-archive command", + environment: map[string]string{ + "SSH_CONNECTION": "1", + "SSH_ORIGINAL_COMMAND": "git-upload-archive 'group/repo'", + }, + expectedArgs: &CommandArgs{SshArgs: []string{"git-upload-archive", "group/repo"}, CommandType: UploadArchive}, }, } -- cgit v1.2.1