Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14024678
D21438.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
951 B
Referenced Files
None
Subscribers
None
D21438.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 8, 11:30 AM (1 w, 14 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6747125
Default Alt Text
D21438.diff (951 B)
Attached To
Mode
D21438: Find the per-worktree .git directory when using git-worktree
Attached
Detach File
Event Timeline
Log In to Comment