Subject: bug#30316: [PATCH] maint: find git worktree

From: Oleg Pykhalov <[email-masked]>
Date: Thu, 01 Feb 2018 10:48:00 +0300

Hello,

The following patch allows to use 'vc-chlog' in the Git worktree instead
of getting “can't determine version control system for DIRECTORY”.

From fb361218cdbceb8acaffa7f7049c41e1e892ca6e Mon Sep 17 00:00:00 2001
From: Oleg Pykhalov <[email-masked]>
Date: Thu, 1 Feb 2018 10:25:00 +0300
Subject: [PATCH] maint: find git worktree

* VC.pm (new): Find .git file instead of directory.
---
 VC.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/VC.pm b/VC.pm
index 4252c61..1eca5b8 100644
--- a/VC.pm
+++ b/VC.pm
@@ -132,7 +132,7 @@ sub new($%)
 	  }
 	}
 
-      if (-d "$d/.git/objects") {
+      if (-f "$d/.git") {
 	$self->{name} = GIT;
       } elsif (-d "$d/.bzr/repository") {
 	$self->{name} = BZR;
-- 
2.15.1

Thanks,
Oleg.