Junio C Hamano wrote: > Sergey Organov <sorganov@xxxxxxxxx> writes: > > >>> [push] > >>> default = simple > >> > >> This is the default, you don't need it. > > > > Yep, a remnant from the past. > > This reminds me of something. > > This particular remnant is there because the user was an early > adopter from the days before the 'simple' setting was made the > default, and it is a common pattern in our configuration variable > settings. We introduce a knob to allow early adopters to experience > new settings, and after a while, one of them may become the default, > and at that point, the setting the user has appears redundant. > > If we had a central registry of configuration variables and their > default values (there isn't one), one could write a configuration > linter to point out "you have this set, but it is the default these > days" to remind you, which sometimes may be useful. > > I say "sometimes" because the reason why the user has a seemingly > redundant setting may be because the default for the variable in > question is planned to change, and the user has it set to keep the > current default---the opposite of the 'early adopter' use case. Long time ago I proposed a core.mode configuration that would be useful for this predicament too [1]. When a configuration is planned to change, git_mode = MODE_NEXT would make the new values the default. Therefore the linter could do: git_mode = MODE_CURRENT; git_config_default_get.. &old_default); git_mode = MODE_NEXT; git_config_default_get.. &new_default); If the values are the same, that means there's no plans to change the default, and therefore it's safe to delete the configuration if the user has the same value. Cheers. [1] https://lore.kernel.org/git/1381561485-20252-1-git-send-email-felipe.contreras@xxxxxxxxx/ -- Felipe Contreras