Re: [PATCH/RFC v2 1/2] git_default_config() rewritten using the config-set API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Matthieu Moy <Matthieu.Moy@xxxxxxxxxxxxxxx> writes:

> Tanay Abhra <tanayabh@xxxxxxxxx> writes:
>
>> git_default_config() now uses config-set API functions to query for
>> values.
>
> I believe you missed a few spots:
>
> $ git grep -n 'git_default_config[^(]'
> Documentation/user-manual.txt:4287:        git_config(git_default_config);
> archive.c:416:  git_config(git_default_config, NULL);
> builtin/config.c:577:           git_config(git_default_config, NULL);
> color.h:73: * if you are just going to change to git_default_config, too.
> fetch-pack.c:880:       git_config(git_default_config, NULL);
> http.c:393:     config.cascade_fn = git_default_config;
> rerere.c:580:   git_config(git_default_config, NULL);
> rerere.c:710:   git_config(git_default_config, NULL);
>
> The following ones should probably be rewritten too:
>
> archive.c:416:  git_config(git_default_config, NULL);
> builtin/config.c:577:           git_config(git_default_config, NULL);
> fetch-pack.c:880:       git_config(git_default_config, NULL);
> rerere.c:580:   git_config(git_default_config, NULL);
> rerere.c:710:   git_config(git_default_config, NULL);

For a one-person toy project it is OK to repurpose the existing
git_default_config() to do completely different thing and make it a
flag day to switch the entire codebase, but in a collaborative
environment where there may be multiple topics in flight, some of
which may be happening where you are not even aware of, it is better
to remove the existing git_default_config() and use a different name
for the different function you are introducing, to force new places
that expect the old git_default_config() to work as before to be
noticed with a linkage error.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]