projects/datalad/bugs-done/--debug is not in effect if precedes -cyohhttp://git-annex.branchable.com/projects/datalad/bugs-done/--debug_is_not_in_effect_if_precedes_-c/git-annexikiwiki2023-01-05T17:30:31Zcomment 1http://git-annex.branchable.com/projects/datalad/bugs-done/--debug_is_not_in_effect_if_precedes_-c/comment_1_0f66414e629e31c2de868f8b7eeb7af5/joey2023-01-05T17:30:31Z2020-02-27T04:20:58Z
<p>-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.</p>
<p>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.</p>
<p>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.</p>
<p>So changeGitConfig needs to make a config change that persists across
changeGitRepo.</p>
<p>Done.</p>