Control: clone -1 -2
Control: reassign -2 git
Control: severity -2 serious
Control: retitle -2 git config --local in non-repo now bombs out
Control: retitle -1 dgit 3.10 and earlier not compatible with git 2.12-ish

Hi.  We have tripped over an accidental and incompatible change in the
behaviour of git config --local:

$ pwd
/home/ian
$ dpkg -s git | grep '^Version'
Version: 1:2.13.1-1
$ git config --local --get-regexp '.*'
fatal: BUG: setup_git_env called without repository
$ echo $?
128
$

Compare stretch:

zealot:~> dpkg -s git | grep '^Version'
Version: 1:2.11.0-3
zealot:~> git config --local --get-regexp '.*'
zealot:~> echo $?
1
zealot:~>

(The exit status there is 1 because, necessarily, nothing matched.)

The stretch behaviour seems more in accordance with the documentation,
which says (git-config(1), section FILES):

  ... If the global or the system-wide configuration file are not
  available they will be ignored.  If the repository configuration
  file is not available or readable, git config will exit with a
  non-zero error code. However, in neither case will an error message
  be issued.

I searched the git package's changelog.gz for `config' and found
nothing that suggests that this incompatible change in behaviour is
deliberate.  (At least some git developers have noticed this change in
behaviour because there's an entry
  remote: avoid reading $GIT_DIR config in non-repo
in 2.12.2.)

Please would you consider returning to the previous behaviour, for
compatibility with other existing callers of git.


In case you are considering downgrading the severity of the "git"
clone of this bug report, to allow the new git to migrate to testing:

This seems to be an accidental incompatible change; it breaks "dgit
clone" completely; it probably breaks other programs which call "git
config".  Observe that even a piece of git itself was broken by this
change.  This does not seem a desirable change to pass on to Debian's
users.

However, if you do downgrade the severity, please increase the
severity of #865863 (which is the bug against "dgit") to "serious".

If you consider the change in behaviour desirable and intend to retain
it, please consider the "git" clone of this bug as a request for the
documentation to be updated to match the behaviour.


Harald: I will, of course, fix #865863 ASAP.  I think that fix
probably ought to go into stable, since many people manually install
newer versions of git.

Thanks,
Ian.

Reply via email to