From e9776958954ad20dc5b84aa129f1431ce0a31bb9 Mon Sep 17 00:00:00 2001 From: Cristian Klein Date: Tue, 8 Jan 2019 13:23:48 +0100 Subject: [PATCH] Better support for git submodule --- cpplint.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cpplint.py b/cpplint.py index bb03dfd..46b2bd2 100755 --- a/cpplint.py +++ b/cpplint.py @@ -1573,8 +1573,10 @@ def RepositoryName(self): # searching up from the current path. root_dir = current_dir = os.path.dirname(fullname) while current_dir != os.path.dirname(current_dir): - if (os.path.exists(os.path.join(current_dir, ".git")) or - os.path.exists(os.path.join(current_dir, ".hg")) or + if os.path.exists(os.path.join(current_dir, ".git")): + root_dir = current_dir + break # stop here, we might be in a submodule + if (os.path.exists(os.path.join(current_dir, ".hg")) or os.path.exists(os.path.join(current_dir, ".svn"))): root_dir = current_dir current_dir = os.path.dirname(current_dir) pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy