vc-dwim-find-git-worktree.patch 627 B

123456789101112131415161718192021222324252627
  1. From fb361218cdbceb8acaffa7f7049c41e1e892ca6e Mon Sep 17 00:00:00 2001
  2. From: Oleg Pykhalov <go.wigust@gmail.com>
  3. Date: Thu, 1 Feb 2018 10:25:00 +0300
  4. Subject: [PATCH] maint: find git worktree
  5. * VC.pm (new): Find .git file instead of directory.
  6. ---
  7. VC.pm | 2 +-
  8. 1 file changed, 1 insertion(+), 1 deletion(-)
  9. diff --git a/VC.pm b/VC.pm
  10. index 4252c61..1eca5b8 100644
  11. --- a/VC.pm
  12. +++ b/VC.pm
  13. @@ -132,7 +132,7 @@ sub new($%)
  14. }
  15. }
  16. - if (-d "$d/.git/objects") {
  17. + if ((-d "$d/.git/objects") || (-f "$d/.git")) {
  18. $self->{name} = GIT;
  19. } elsif (-d "$d/.bzr/repository") {
  20. $self->{name} = BZR;
  21. --
  22. 2.15.1