aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing
diff options
context:
space:
mode:
Diffstat (limited to 'plumbing')
-rw-r--r--plumbing/transport/ssh/common.go4
-rw-r--r--plumbing/transport/ssh/common_test.go2
2 files changed, 2 insertions, 4 deletions
diff --git a/plumbing/transport/ssh/common.go b/plumbing/transport/ssh/common.go
index af79dfb..a844c78 100644
--- a/plumbing/transport/ssh/common.go
+++ b/plumbing/transport/ssh/common.go
@@ -154,9 +154,7 @@ func overrideConfig(overrides *ssh.ClientConfig, c *ssh.ClientConfig) {
f := t.Field(i)
vcf := vc.FieldByName(f.Name)
vof := vo.FieldByName(f.Name)
- if isZeroValue(vcf) {
- vcf.Set(vof)
- }
+ vcf.Set(vof)
}
*c = vc.Interface().(ssh.ClientConfig)
diff --git a/plumbing/transport/ssh/common_test.go b/plumbing/transport/ssh/common_test.go
index 1b07eee..5315e28 100644
--- a/plumbing/transport/ssh/common_test.go
+++ b/plumbing/transport/ssh/common_test.go
@@ -37,5 +37,5 @@ func (s *SuiteCommon) TestOverrideConfigKeep(c *C) {
}
overrideConfig(config, target)
- c.Assert(target.User, Equals, "bar")
+ c.Assert(target.User, Equals, "foo")
}