Skip to content

Commit bff5dd8

Browse files
committed
feat: add keybinding migration
1 parent b14061b commit bff5dd8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pkg/config/app_config.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,12 @@ func loadUserConfig(configFiles []string, base *UserConfig) (*UserConfig, error)
175175
// from one container to another, or changing the type of a key (e.g. from bool
176176
// to an enum).
177177
func migrateUserConfig(path string, content []byte) ([]byte, error) {
178-
changedContent, err := yaml_utils.RenameYamlKey(content, []string{"gui", "skipUnstageLineWarning"},
179-
"skipDiscardChangeWarning")
178+
changedContent, err := yaml_utils.RenameYamlKey(content, []string{"gui", "skipUnstageLineWarning"}, "skipDiscardChangeWarning")
179+
if err != nil {
180+
return nil, fmt.Errorf("Couldn't migrate config file at `%s`: %s", path, err)
181+
}
182+
183+
changedContent, err = yaml_utils.RenameYamlKey(content, []string{"gui", "resetCommitAuthor"}, "amendAttributeMenu")
180184
if err != nil {
181185
return nil, fmt.Errorf("Couldn't migrate config file at `%s`: %s", path, err)
182186
}

0 commit comments

Comments
 (0)