From 4b71e650c4502d02a1cdf581650764ef897386d6 Mon Sep 17 00:00:00 2001 From: Javi Fontan Date: Tue, 9 Jan 2018 15:30:58 +0100 Subject: 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 --- config/config.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'config/config.go') 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. -- cgit