]> git.ipfire.org Git - thirdparty/git.git/commit
format-patch: move git_config() before repo_init_revisions()
authorDenton Liu <liu.denton@gmail.com>
Mon, 9 Dec 2019 13:10:48 +0000 (05:10 -0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 9 Dec 2019 21:37:21 +0000 (13:37 -0800)
commit09ac67a1839eda984b172d4d75153c767d6bbf14
tree6c0965e3887a42bcba8cc57445f29a03422a4367
parent8164c961e16834da283cbf5ac5d22313b982a484
format-patch: move git_config() before repo_init_revisions()

In 13cdf78094 (format-patch: teach format.notes config option,
2019-05-16), the order in which git_config() and repo_init_revisions()
were swapped so that `rev.notes_opt` would be initialized before
git_config() was called. This is problematic, however, as git_config()
should generally be called before repo_init_revisions().

Break this circular dependency by creating `show_notes` and `notes_opt`
which git_config() reads into. Then, copy these values over to
`rev.show_notes` and `rev.notes_opt` after repo_init_revisions() is
called.

Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/log.c