git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 1/1] config: report a bug if git_dir exists without commondir

From
Jeff King <peff@peff.net>
Date
Nov 14, 2018, 21:42 UTC
Message-ID
<20181114214212.GB2960@sigill.intra.peff.net>
In-Reply-To
<0767f9837811c922c49c5aa148252f9e66320f18.1542203938.git.gitgitgadget@gmail.com>
On Wed, Nov 14, 2018 at 05:59:02AM -0800, Johannes Schindelin via GitGitGadget wrote:
Show 20 quoted lines
> From: Johannes Schindelin <johannes.schindelin@gmx.de>
> 
> 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>
> ---
>  config.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/config.c b/config.c
> index 4051e38823..db6b0167c6 100644
> --- a/config.c
> +++ b/config.c
> @@ -1676,6 +1676,8 @@ static int do_git_config_sequence(const struct config_options *opts,
>  
>  	if (opts->commondir)
>  		repo_config = mkpathdup("%s/config", opts->commondir);
> +	else if (opts->git_dir)
> +		BUG("git_dir without commondir");
Yeah, I think this is the right thing to do. Thanks!
-Peff
Previous: Johannes Schindelin via GitGitGadget
Message 7 of 7 in “Some left-over add-on for bw/config-h”
  1. 0/1 Some left-over add-on for bw/config-hJohannes Schindelin via GitGitGadget, Nov 13, 2018
  2. 1/1 do_git_config_sequence(): fall back to git_dir if commondir is NULLJohannes Schindelin via GitGitGadget, Nov 13, 2018
  3. Junio C HamanoNov 14, 2018
  4. Jeff KingNov 14, 2018
  5. 0/1 Some left-over add-on for bw/config-hJohannes Schindelin via GitGitGadget, Nov 14, 2018
  6. 1/1 config: report a bug if git_dir exists without commondirJohannes Schindelin via GitGitGadget, Nov 14, 2018
  7. Jeff KingNov 14, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.