src/eric7/Plugins/VcsPlugins/vcsGit/GitBlameDialog.py

branch
eric7
changeset 9616
13aa04c979d7
parent 9473
3f23dbf37dbe
child 9653
e67609152c5e
--- a/src/eric7/Plugins/VcsPlugins/vcsGit/GitBlameDialog.py	Mon Dec 12 19:50:37 2022 +0100
+++ b/src/eric7/Plugins/VcsPlugins/vcsGit/GitBlameDialog.py	Tue Dec 13 14:03:13 2022 +0100
@@ -100,11 +100,9 @@
         dname, fname = self.vcs.splitPath(fn)
 
         # find the root of the repo
-        repodir = dname
-        while not os.path.isdir(os.path.join(repodir, self.vcs.adminDir)):
-            repodir = os.path.dirname(repodir)
-            if os.path.splitdrive(repodir)[1] == os.sep:
-                return
+        repodir = self.vcs.findRepoRoot(dname)
+        if not repodir:
+            return
 
         args = self.vcs.initCommand("blame")
         args.append(

eric ide

mercurial