Page MenuHomePhabricator

D21438.diff
No OneTemporary

D21438.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_type == '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
Sat, Nov 16, 11:35 AM (9 h, 57 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6747125
Default Alt Text
D21438.diff (951 B)

Event Timeline