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

Re: [PATCH v3] config.c: split some variables to $GIT_DIR/config.worktree

From
Max Kirillov <max@max630.net>
Date
Apr 20, 2015, 02:51 UTC
Message-ID
<20150420025110.GD786@wheezy.local>
In-Reply-To
<20150418111023.GA1496@lanh>
On Sat, Apr 18, 2015 at 06:10:23PM +0700, Duy Nguyen wrote:
Show 17 quoted lines
> On Tue, Apr 14, 2015 at 02:37:39AM +0300, Max Kirillov wrote:
> > On Tue, Mar 31, 2015 at 07:14:39PM +0700, Nguyễn Thái Ngọc Duy wrote:
> > > core.worktree and core.bare, which are treated specially in 31e26eb [1],
> > > are now moved to info/core.worktree and the special treatment reverted.
> > <...>
> > > -	if (get_common_dir(&sb, gitdir))
> > > -		fn = check_repo_format;
> > > -	else
> > > -		fn = check_repository_format_version;
> > 
> > By the way, after this '$GIT_DIR/common overrides core.worktree'
> > from t1501 started failing. I don't know what would be
> > better to do with the case, just remove maybe?
> 
> I think that test spots a real problem. In this function, I ignore the
> config split when I pass NULL as worktree_config to git_config_early().
> Something like this should fix it.

I just realized that the testcase does have info/config.worktree with the variable included, because any repository has it. Then, of course, the variable from common directory should be ignored and the testcase is correct.

By the way, if checkout --to run on repository created before the feaure added, the linked checkout will not be able to use own variables. Should checkout --to check that the file exists and create it in case it does not?

Previous: Duy NguyenNext: Duy Nguyen
Message 20 of 22 in “worktree.* config keys and submodule and multiple worktrees”
  1. 0/3 worktree.* config keys and submodule and multiple worktreesNguyễn Thái Ngọc Duy, Feb 8, 2015
  2. 1/3 config.c: new config namespace worktree.* stored in $GIT_DIR/config.worktreeNguyễn Thái Ngọc Duy, Feb 8, 2015
  3. 2/3 setup: add worktree.path to shadow core.worktreeNguyễn Thái Ngọc Duy, Feb 8, 2015
  4. 3/3 submodule: use worktree.path instead of core.worktreeNguyễn Thái Ngọc Duy, Feb 8, 2015
  5. Jens LehmannFeb 8, 2015
  6. Jens LehmannFeb 8, 2015
  7. Duy NguyenFeb 9, 2015
  8. per-repository and per-worktree config variablesMax Kirillov, Mar 18, 2015
  9. Duy NguyenMar 24, 2015
  10. config.c: split some variables to $GIT_DIR/config.worktreeNguyễn Thái Ngọc Duy, Mar 26, 2015
  11. Max KirillovMar 26, 2015
  12. Duy NguyenMar 29, 2015
  13. Max KirillovMar 30, 2015
  14. config.c: split some variables to $GIT_DIR/config.worktreeNguyễn Thái Ngọc Duy, Mar 31, 2015
  15. Duy NguyenMar 31, 2015
  16. Max KirillovApr 1, 2015
  17. Duy NguyenApr 3, 2015
  18. Max KirillovApr 13, 2015
  19. Duy NguyenApr 18, 2015
  20. Max KirillovApr 20, 2015
  21. Duy NguyenApr 20, 2015
  22. Jens LehmannMar 25, 2015

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.