{"thread":{"id":"52813","subject":"FW: bug: fatal: this operation must be run in a work tree - after enabling worktreeConfig=true","startedAt":"2020-02-15T21:40:10Z","lastAt":"2020-02-15T21:40:10Z","messageCount":1,"participants":["boaz_nahum@amat.com"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"391856","messageId":"AM6PR09MB25980EF868A3FA782109D8DE9A140@AM6PR09MB2598.eurprd09.prod.outlook.com","threadId":"52813","inReplyTo":"AM6PR09MB2598893AEA5DB2D55DDFBF299A140@AM6PR09MB2598.eurprd09.prod.outlook.com","subject":"FW: bug: fatal: this operation must be run in a work tree - after enabling worktreeConfig=true","fromName":"","fromEmail":"boaz_nahum@amat.com","sentAt":"2020-02-15T21:11:19Z","receivedAt":"2020-02-15T21:40:10Z","isPatch":false,"sender":{"key":"boaz_nahum@amat.com","avatar":null},"body":"\nHi\n(English is not my language)\n\nWe started to work with sparse-checkout and we found two issues.\n\nWe work with bare repository, with a worktree 'arounds' it.\n\nTwo issues:\n\nIssue 1) fatal: this operation must be run in a work tree\n\nTO reproduce, In bare repository:\n   git worktree add ../testwt pub/empty -no-checkout\nSwitch to worktree\n  git sparse-checkout init\n\nResult:\n\n    fatal: this operation must be run in a work tree\nany operation in any worktree now ends with:\n    fatal: this operation must be run in a work tree\n\nThis is because  extensions.worktreeConfig=true\nWorkaround\n1. core.bare=false in bare - not acceptable\n2. Remove worktreeConfig=true  - not good idea if we want to work with sparse-checkout\n3. core.bare=false  in worktree, but we need to apply it on any worktree\n\nPlease note that this happens even  if in time of creating worktree worktreeConfig=true\n\nIssue 2) fatal: Unable to create 'F:/views/MonoCentral/worktrees/testwt3/info/sparse-checkout.lock': No such file or directory\n\nTo reproduce, same as above, but worktreeConfig=false before starting,\nResult:\n    fatal: Unable to create 'F:/views/MonoCentral/worktrees/testwt3/info/sparse-checkout.lock': No such file or directory\n\nWorkaround:\n  Set extensions.worktreeConfig=true  before adding the worktree or running sparse-checkout\n\n\n\nThanks\nBoaz\n\n\nThe content of this message is APPLIED MATERIALS CONFIDENTIAL. If you are not the intended recipient, please notify me, delete this email and do not use or distribute this email.\n"}]}