diff options
author | Javi Fontan <jfontan@gmail.com> | 2018-01-09 15:30:58 +0100 |
---|---|---|
committer | Javi Fontan <jfontan@gmail.com> | 2018-01-09 15:35:11 +0100 |
commit | 4b71e650c4502d02a1cdf581650764ef897386d6 (patch) | |
tree | 4cedc2c39487abfe45f763b20cb2ef6a9008343a /config | |
parent | bf3b1f1fb9e0a04d0f87511a7ded2562b48a19d8 (diff) | |
download | go-git-4b71e650c4502d02a1cdf581650764ef897386d6.tar.gz |
Set default pack window size in config
Config is not initialized with the default window size. Without this the
window size is 0 by default and packfile code is unable to generate
deltas.
Signed-off-by: Javi Fontan <jfontan@gmail.com>
Diffstat (limited to 'config')
-rw-r--r-- | config/config.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/config/config.go b/config/config.go index fc4cd28..b5132ac 100644 --- a/config/config.go +++ b/config/config.go @@ -64,11 +64,15 @@ type Config struct { // NewConfig returns a new empty Config. func NewConfig() *Config { - return &Config{ + config := &Config{ Remotes: make(map[string]*RemoteConfig), Submodules: make(map[string]*Submodule), Raw: format.New(), } + + config.Pack.Window = defaultPackWindow + + return config } // Validate validates the fields and sets the default values. |