Bugfix: Don't ignore --debug when it is followed by -c
This commit is contained in:
parent
ba4a2d8734
commit
c089f395b0
4 changed files with 52 additions and 14 deletions
|
@ -64,4 +64,4 @@ git-annex version: 7.20190819+git2-g908476a9b-1~ndall+1
|
|||
[[!meta author=yoh]]
|
||||
[[!tag projects/datalad]]
|
||||
|
||||
|
||||
> [[fixed|done]] --[[Joey]]
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
[[!comment format=mdwn
|
||||
username="joey"
|
||||
subject="""comment 1"""
|
||||
date="2020-02-27T04:20:58Z"
|
||||
content="""
|
||||
-c uses adjustGitRepo which calls changeGitRepo, which
|
||||
re-extracts the GitConfig. --debug uses changeGitConfig which
|
||||
sets annexDebug in the GitConfig, which does not survive the changeGitRepo.
|
||||
|
||||
There might be a broader problem here, as changeGitRepo is also
|
||||
called by setConfig in many parts of the code. I think it narrowly
|
||||
escapes being a problem, because by the time a command is started,
|
||||
it's already enabled debug output, and so the GitConfig being reloaded
|
||||
doesn't disable debugging.
|
||||
|
||||
Other calls to changeGitConfig could also be a problem, if followed by
|
||||
an adjustGitRepo which loses those changes. There are only a few others,
|
||||
look probably ok, but this would be an easy gotcha to hit later.
|
||||
|
||||
So changeGitConfig needs to make a config change that persists across
|
||||
changeGitRepo.
|
||||
|
||||
Done.
|
||||
"""]]
|
Loading…
Add table
Add a link
Reference in a new issue