Re: [PATCH v5 2/4] config: --worktree for manipulating per-worktree config file
- From
Stefan Beller <sbeller@google.com>
- Date
- Jan 10, 2017, 16:52 UTC
- Message-ID
- <CAGZ79kZe_EG8YhpPtBwPqrR+yPjp2rQbqkAvUX6zeVNXg58NqQ@mail.gmail.com>
- In-Reply-To
- <20170110112524.12870-3-pclouds@gmail.com>
Show 6 quoted lines
> + if (repository_format_worktree_config)
> + given_config_source.file = git_pathdup("config.worktree");
> + else if (worktrees[0] && worktrees[1]) {
> + die("BUG: migration is not supported yet");
> + } else
> + given_config_source.file = git_pathdup("config");nit: inconsistent use uf braces for single statements here. I mean the braces are needed in the BUG case, as otherwise we'd have a dangling else, but then you could put the brace in the else case as well. This nit doesn't warrant a reroll on its own.
Show 8 quoted lines
> + free_worktrees(worktrees);
> + } else if (given_config_source.file) {
> if (!is_absolute_path(given_config_source.file) && prefix)
> given_config_source.file =
> xstrdup(prefix_filename(prefix,
> --
> 2.8.2.524.g6ff3d78
>