Re: [PATCH 10/10] setup: drop GIT_REPO_VERSION constants

2016-03-01 Thread Jeff King
On Tue, Mar 01, 2016 at 07:13:02PM -0500, David Turner wrote: > On Tue, 2016-03-01 at 09:45 -0500, Jeff King wrote: > > - char repo_version_string[10]; > > > > /* This forces creation of new config file */ > > - xsnprintf(repo_version_string, sizeof(repo_version_string), > > -

Re: [PATCH 10/10] setup: drop GIT_REPO_VERSION constants

2016-03-01 Thread David Turner
On Tue, 2016-03-01 at 09:45 -0500, Jeff King wrote: > - char repo_version_string[10]; > > /* This forces creation of new config file */ > - xsnprintf(repo_version_string, sizeof(repo_version_string), > - "%d", GIT_REPO_VERSION); > -

[PATCH 10/10] setup: drop GIT_REPO_VERSION constants

2016-03-01 Thread Jeff King
As each constant is used in only one place, they are not helping us avoid duplication. And they may be actively misleading, as a version check is now much more complicated than a simple integer comparison. The logic is in verify_repository_format, and if you are thinking about bumping the version,