From af46dd50e9e0bea569449c4a70fc9217594cb2ba Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Sun, 21 Jul 2019 05:55:46 +0200 Subject: *: fixed tautological error conditionsautological error conditions - Added missing error handling around encodeCommitData and prevented shadowing err. - Removed tautological error checks. Signed-off-by: Christian Muehlhaeuser (cherry picked from commit 7d76176416551fc21d98bc17768d158a82281406) --- plumbing/transport/server/server.go | 5 ----- 1 file changed, 5 deletions(-) (limited to 'plumbing/transport') diff --git a/plumbing/transport/server/server.go b/plumbing/transport/server/server.go index 20bd12e..8e0dcc1 100644 --- a/plumbing/transport/server/server.go +++ b/plumbing/transport/server/server.go @@ -286,11 +286,6 @@ func (s *rpSession) updateReferences(req *packp.ReferenceUpdateRequest) { continue } - if err != nil { - s.setStatus(cmd.Name, err) - continue - } - ref := plumbing.NewHashReference(cmd.Name, cmd.New) err := s.storer.SetReference(ref) s.setStatus(cmd.Name, err) -- cgit From e5c9c0dd9ff1f42dcdaba7a51919cf43abdb79f9 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Sun, 21 Jul 2019 06:24:22 +0200 Subject: *: avoid unnecessary conversions No need to convert these values, they're already of the right type. Signed-off-by: Christian Muehlhaeuser (cherry picked from commit a1d8a7ac8bd0e4aff0f27dbb8bb37b8bd13a1346) --- plumbing/transport/ssh/auth_method.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plumbing/transport') diff --git a/plumbing/transport/ssh/auth_method.go b/plumbing/transport/ssh/auth_method.go index dbb47c5..1e5c383 100644 --- a/plumbing/transport/ssh/auth_method.go +++ b/plumbing/transport/ssh/auth_method.go @@ -61,7 +61,7 @@ func (a *KeyboardInteractive) ClientConfig() (*ssh.ClientConfig, error) { return a.SetHostKeyCallback(&ssh.ClientConfig{ User: a.User, Auth: []ssh.AuthMethod{ - ssh.KeyboardInteractiveChallenge(a.Challenge), + a.Challenge, }, }) } -- cgit