diff --git a/cmd/gitserver/server/patch.go b/cmd/gitserver/server/patch.go index 0f289612fd86..a8b4ba887643 100644 --- a/cmd/gitserver/server/patch.go +++ b/cmd/gitserver/server/patch.go @@ -234,7 +234,7 @@ func (s *Server) createCommitFromPatch(ctx context.Context, req protocol.CreateC // NOTE: join messages with a blank line in between ("\n\n") // because the previous behavior was to use multiple -m arguments, // which concatenate with a blank line in between. - // Gerrit is the only code host that usees multiple messages at the moment + // Gerrit is the only code host that uses multiple messages at the moment. cmd.Stdin = strings.NewReader(strings.Join(messages, "\n\n")) cmd.Dir = tmpRepoDir diff --git a/internal/gitserver/gitdomain/exec.go b/internal/gitserver/gitdomain/exec.go index 572a29443765..09d55f7ea281 100644 --- a/internal/gitserver/gitdomain/exec.go +++ b/internal/gitserver/gitdomain/exec.go @@ -1,7 +1,6 @@ package gitdomain import ( - "fmt" "os" "strconv" "strings" @@ -155,7 +154,6 @@ func IsAllowedGitCmd(logger log.Logger, args []string) bool { return false } if strings.HasPrefix(arg, "-") { - fmt.Printf("EVALUATING ARGUMENT %d: %s\n", i, arg) // Special-case `git log -S` and `git log -G`, which interpret any characters // after their 'S' or 'G' as part of the query. There is no long form of this // flags (such as --something=query), so if we did not special-case these, there diff --git a/internal/gitserver/gitdomain/exec_test.go b/internal/gitserver/gitdomain/exec_test.go index cb5cf89ff936..e7e601b535e3 100644 --- a/internal/gitserver/gitdomain/exec_test.go +++ b/internal/gitserver/gitdomain/exec_test.go @@ -22,6 +22,8 @@ func TestIsAllowedGitCmd(t *testing.T) { {"reset", "-q", "ceed6a398bd66c090b6c24bd8251ac9255d90fb2"}, {"apply", "--cached", "-p0"}, {"commit", "-m", "An awesome commit message."}, + {"commit", "-F", "-"}, + {"commit", "--file=-"}, {"push", "--force", "git@github.com:repo/name", "f22cfd066432e382c24f1eaa867444671e23a136:refs/heads/a-branch"}, {"update-ref", "--"}, }