Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

Commit 4b71e65

Browse files
committed
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>
1 parent bf3b1f1 commit 4b71e65

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

config/config.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,15 @@ type Config struct {
6464

6565
// NewConfig returns a new empty Config.
6666
func NewConfig() *Config {
67-
return &Config{
67+
config := &Config{
6868
Remotes: make(map[string]*RemoteConfig),
6969
Submodules: make(map[string]*Submodule),
7070
Raw: format.New(),
7171
}
72+
73+
config.Pack.Window = defaultPackWindow
74+
75+
return config
7276
}
7377

7478
// Validate validates the fields and sets the default values.

0 commit comments

Comments
 (0)