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

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
>
Previous: Nguyễn Thái Ngọc DuyNext: Nguyễn Thái Ngọc Duy
Message 4 of 13 in “Per-worktree config file support”
  1. 0/4 Per-worktree config file supportNguyễn Thái Ngọc Duy, Jan 10, 2017
  2. 1/4 config: read per-worktree config filesNguyễn Thái Ngọc Duy, Jan 10, 2017
  3. 2/4 config: --worktree for manipulating per-worktree config fileNguyễn Thái Ngọc Duy, Jan 10, 2017
  4. Stefan BellerJan 10, 2017
  5. 3/4 config: automatically migrate to new config layout when --worktree is usedNguyễn Thái Ngọc Duy, Jan 10, 2017
  6. 4/4 t2029: add tests for per-worktree configNguyễn Thái Ngọc Duy, Jan 10, 2017
  7. 5/4 Redefine core.bare in multiple working tree settingNguyễn Thái Ngọc Duy, Jan 10, 2017
  8. Junio C HamanoJan 12, 2017
  9. Duy NguyenJan 19, 2017
  10. Duy NguyenJan 10, 2017
  11. Stefan BellerJan 10, 2017
  12. Duy NguyenJan 19, 2017
  13. Stefan BellerJan 19, 2017

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.