From: "Johannes Schindelin via GitGitGadget" <email@example.com> To: firstname.lastname@example.org Cc: Junio C Hamano <email@example.com> Subject: [PATCH 0/1] Make the includeif:onbranch feature more robust Date: Wed, 31 Jul 2019 12:53:51 -0700 (PDT) [thread overview] Message-ID: <firstname.lastname@example.org> (raw) I actually stumbled over this while rebasing the VFS for Git patches, in relation with the pre-command hook that we still support there (we're slowly migrating toward Trace2, of course). Once I figured out what the problem was, I hunted for a way to trigger this bug in plain Git, and git help -a is the one I settled on. It had to be a command that uses the early config machinery (and git help -a uses it to list all aliases), and it had to be a command that does not discover a .git directory automatically (cmd_help is listed without any flags in git.c, so: check). Of course, part of me wants to just go and dig into the refs part of the code to introduce an equivalent to the "early config" machinery (calling it "early ref store"), but: 1. We're really in feature freeze, and I want this bug fix to go into v2.23.0. 2. It is actually a pretty obscure thing to want: a branch-dependent config that is used that early that the Git directory was not yet discovered. I could imagine that some power user wants to play some games at some stage, say, with the pager depending on the name of the current branch, but even then, to run into the issue with this here patch where it simply ignores the includeif.onbranch: setting in the early config code path, a command has to be run that does not immediately set up the_repository->gitdir but still wants to use the configured pager. So yes, this patch introduces a known issue, but it does fix a BUG() where no bug should be reported. Johannes Schindelin (1): config: work around bug with includeif:onbranch and early config config.c | 3 ++- t/t1309-early-config.sh | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) base-commit: 026dd738a6e5f1e42ef0f390feacb5ed6acc4ee8 Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-300%2Fdscho%2Fonbranch-and-early-config-v1 Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-300/dscho/onbranch-and-early-config-v1 Pull-Request: https://github.com/gitgitgadget/git/pull/300 -- gitgitgadget
next reply other threads:[~2019-07-31 19:53 UTC|newest] Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-07-31 19:53 Johannes Schindelin via GitGitGadget [this message] 2019-07-31 19:53 ` [PATCH 1/1] config: work around bug with includeif:onbranch and early config Johannes Schindelin via GitGitGadget 2019-07-31 21:37 ` Junio C Hamano 2019-07-31 20:06 ` [PATCH v2 0/1] Make the includeif:onbranch feature more robust Johannes Schindelin via GitGitGadget 2019-07-31 20:06 ` [PATCH v2 1/1] config: work around bug with includeif:onbranch and early config Johannes Schindelin via GitGitGadget 2019-07-31 22:02 ` Jeff King 2019-07-31 22:13 ` Johannes Schindelin 2019-07-31 23:12 ` Jeff King 2019-08-01 0:49 ` Jeff King 2019-08-01 17:24 ` Jeff Hostetler 2019-08-06 12:26 ` [PATCH 0/3] the_repository initialization cleanup Jeff King 2019-08-06 12:26 ` [PATCH 1/3] t1309: use short branch name in includeIf.onbranch test Jeff King 2019-08-06 12:27 ` [PATCH 2/3] common-main: delay trace2 initialization Jeff King 2019-08-06 12:27 ` [PATCH 3/3] config: stop checking whether the_repository is NULL Jeff King 2019-08-06 12:49 ` Jeff King 2019-08-08 19:48 ` Johannes Schindelin 2019-08-06 12:56 ` [PATCH v2 1/1] config: work around bug with includeif:onbranch and early config Jeff King
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style List information: http://vger.kernel.org/majordomo-info.html * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --subject='Re: [PATCH 0/1] Make the includeif:onbranch feature more robust' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Code repositories for project(s) associated with this inbox: https://80x24.org/mirrors/git.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).