Page MenuHomePhabricator

D21438.id51014.diff
No OneTemporary

D21438.id51014.diff

diff --git a/src/workingcopyidentity/ArcanistWorkingCopyIdentity.php b/src/workingcopyidentity/ArcanistWorkingCopyIdentity.php
--- a/src/workingcopyidentity/ArcanistWorkingCopyIdentity.php
+++ b/src/workingcopyidentity/ArcanistWorkingCopyIdentity.php
@@ -180,6 +180,16 @@
$identity = new ArcanistWorkingCopyIdentity($project_root, $config);
$identity->localMetaDir = $vcs_root.'/.'.$vcs_type;
+ if ($vcs == 'git' && !is_dir($identity->localMetaDir)) {
+ /* Find the .git directory for git-worktrees: */
+ list($gitdir) = execx('git rev-parse --git-dir');
+ $identity->localMetaDir = trim($gitdir);
+ $console->writeLog(
+ "%s\n",
+ pht(
+ 'Working Copy: Git dir for worktree "%s" is at "%s".',
+ $vcs_root, $identity->localMetaDir));
+ }
$identity->localConfig = $identity->readLocalArcConfig();
$identity->vcsType = $vcs_type;
$identity->vcsRoot = $vcs_root;

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 3, 9:42 PM (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6757956
Default Alt Text
D21438.id51014.diff (946 B)

Event Timeline