override git config –system in .gitconfig user file ( git config –global )

If it is a system wide config, each user can override a config value in his/her global and local settings.

But there is no easy way to “deactivate” a setting in a lower config file.
Even set it to "" generally has unintended consequences. That very topic was discussed in April 2010.

For instance, deactivating the send-email option:

True, after thinking a bit about this using no value to unset is a horrible, horrible hack.
git-send-email should be corrected to not only check that there is value from config or command line option, but also that it is sane (i.e. non-empty, or simply true-ish if we say
that smtpuser = "0" is not something we need to worry about supporting).

That would be true for any setting: the diff.c#run_diff_cmd() function will attempt to run an external diff if it has detected and diff.external value (even "").

if (!strcmp(var, "diff.external"))
  return git_config_string(&external_diff_cmd_cfg, var, value);

leads to:

if (pgm) {
  run_external_diff(pgm, name, other, one, two, xfrm_msg,
  complete_rewrite);
  return;
}

So there is no easy way to block a system wide diff external, except by making sure those users reference a different git system installation path (meaning a different system setting).

Leave a Comment