From bdaf503ea1e99a17caeed7ce6478df22cde31c2b Mon Sep 17 00:00:00 2001 From: Georg Piewald Date: Mon, 4 Feb 2019 18:07:17 +0100 Subject: [PATCH] Fixed search for repository root directory In the situation, where one git/svn/hg repository is located inside the directory tree of another, the search incorrectly selects the outer one instead of the inner one. --- cpplint.py | 1 + 1 file changed, 1 insertion(+) diff --git a/cpplint.py b/cpplint.py index a8f1790..3a969f6 100755 --- a/cpplint.py +++ b/cpplint.py @@ -1356,6 +1356,7 @@ def RepositoryName(self): os.path.exists(os.path.join(current_dir, ".hg")) or os.path.exists(os.path.join(current_dir, ".svn"))): root_dir = current_dir + break current_dir = os.path.dirname(current_dir) if (os.path.exists(os.path.join(root_dir, ".git")) or