From: <Boaz_Nahum@amat.com>
To: <git@vger.kernel.org>
Subject: FW: bug: fatal: this operation must be run in a work tree - after enabling worktreeConfig=true
Date: Sat, 15 Feb 2020 21:11:19 +0000 [thread overview]
Message-ID: <AM6PR09MB25980EF868A3FA782109D8DE9A140@AM6PR09MB2598.eurprd09.prod.outlook.com> (raw)
In-Reply-To: <AM6PR09MB2598893AEA5DB2D55DDFBF299A140@AM6PR09MB2598.eurprd09.prod.outlook.com>
Hi
(English is not my language)
We started to work with sparse-checkout and we found two issues.
We work with bare repository, with a worktree 'arounds' it.
Two issues:
Issue 1) fatal: this operation must be run in a work tree
TO reproduce, In bare repository:
git worktree add ../testwt pub/empty -no-checkout
Switch to worktree
git sparse-checkout init
Result:
fatal: this operation must be run in a work tree
any operation in any worktree now ends with:
fatal: this operation must be run in a work tree
This is because extensions.worktreeConfig=true
Workaround
1. core.bare=false in bare - not acceptable
2. Remove worktreeConfig=true - not good idea if we want to work with sparse-checkout
3. core.bare=false in worktree, but we need to apply it on any worktree
Please note that this happens even if in time of creating worktree worktreeConfig=true
Issue 2) fatal: Unable to create 'F:/views/MonoCentral/worktrees/testwt3/info/sparse-checkout.lock': No such file or directory
To reproduce, same as above, but worktreeConfig=false before starting,
Result:
fatal: Unable to create 'F:/views/MonoCentral/worktrees/testwt3/info/sparse-checkout.lock': No such file or directory
Workaround:
Set extensions.worktreeConfig=true before adding the worktree or running sparse-checkout
Thanks
Boaz
The 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.
parent reply other threads:[~2020-02-15 21:40 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <AM6PR09MB2598893AEA5DB2D55DDFBF299A140@AM6PR09MB2598.eurprd09.prod.outlook.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AM6PR09MB25980EF868A3FA782109D8DE9A140@AM6PR09MB2598.eurprd09.prod.outlook.com \
--to=boaz_nahum@amat.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).