From: "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>
Subject: [PATCH v2 0/1] Some left-over add-on for bw/config-h
Date: Wed, 14 Nov 2018 05:59:00 -0800 (PST) [thread overview]
Message-ID: <pull.78.v2.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.78.git.gitgitgadget@gmail.com>
Back when bw/config-h was developed (and backported to Git for Windows), I
came up with a patch to use git_dir if commondir is NULL, and contributed
that as v1 of this patch. However, it was deemed a bug if that happens, so
let's instead detect that condition and report it.
Change since v1:
* Be loud about this bug instead of papering over it.
Johannes Schindelin (1):
config: report a bug if git_dir exists without commondir
config.c | 2 ++
1 file changed, 2 insertions(+)
base-commit: 8858448bb49332d353febc078ce4a3abcc962efe
Published-As: https://github.com/gitgitgadget/git/releases/tags/pr-78%2Fdscho%2Fbw%2Fconfig-h-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-78/dscho/bw/config-h-v2
Pull-Request: https://github.com/gitgitgadget/git/pull/78
Range-diff vs v1:
1: a3854e4ed8 ! 1: 0767f98378 do_git_config_sequence(): fall back to git_dir if commondir is NULL
@@ -1,8 +1,9 @@
Author: Johannes Schindelin <johannes.schindelin@gmx.de>
- do_git_config_sequence(): fall back to git_dir if commondir is NULL
+ config: report a bug if git_dir exists without commondir
- Just some defensive programming.
+ This did happen at some stage, and was fixed relatively quickly. Make
+ sure that we detect very quickly, too, should that happen again.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@@ -14,7 +15,7 @@
if (opts->commondir)
repo_config = mkpathdup("%s/config", opts->commondir);
+ else if (opts->git_dir)
-+ repo_config = mkpathdup("%s/config", opts->git_dir);
++ BUG("git_dir without commondir");
else
repo_config = NULL;
--
gitgitgadget
next prev parent reply other threads:[~2018-11-14 13:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-13 15:05 [PATCH 0/1] Some left-over add-on for bw/config-h Johannes Schindelin via GitGitGadget
2018-11-13 15:05 ` [PATCH 1/1] do_git_config_sequence(): fall back to git_dir if commondir is NULL Johannes Schindelin via GitGitGadget
2018-11-14 5:52 ` [PATCH 0/1] Some left-over add-on for bw/config-h Junio C Hamano
2018-11-14 7:31 ` Jeff King
2018-11-14 13:59 ` Johannes Schindelin via GitGitGadget [this message]
2018-11-14 13:59 ` [PATCH v2 1/1] config: report a bug if git_dir exists without commondir Johannes Schindelin via GitGitGadget
2018-11-14 21:42 ` 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 \
--in-reply-to=pull.78.v2.git.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public 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).