third_party/blink/tools/blinkpy/style/checkers/cpp.py
def repository_name(self):
        """Full name after removing the local path to the repository.

        If we have a real absolute path name here we can try to do something smart:
        detecting the root of the checkout and truncating /path/to/checkout from
        the name so that we get header guards that don't include things like
        "C:\Documents and Settings\..." or "/home/username/..." in them and thus
        people on different computers who have checked the source out to different
        locations won't see bogus errors.
        """
        fullname = self.full_name()

        if os.path.exists(fullname):
            project_dir = os.path.dirname(fullname)

            # Try to find a git top level directory by searching up from the current path.
            root_dir = os.path.dirname(fullname)
            while (root_dir != os.path.dirname(root_dir)
                   and not os.path.exists(os.path.join(root_dir, '.git'))):
                root_dir = os.path.dirname(root_dir)
                if os.path.exists(os.path.join(root_dir, '.git')):
                    prefix = os.path.commonprefix([root_dir, project_dir])
                    return fullname[len(prefix) + 1:]

        # Don't know what to do; header guard warnings may be wrong...
        return fullname
Full name after removing the local path to the repository.

        If we have a real absolute path name here we can try to do something smart:
        detecting the root of the checkout and truncating /path/to/checkout from
        the name so that we get header guards that don't include things like
        "C:\Documents and Settings\..." or "/home/username/..." in them and thus
        people on different computers who have checked the source out to different
        locations won't see bogus errors.
        
Full name after removing the local path to the repository.
Full name after removing the local path to the repository .
def repository_name(self):
        fullname = self.full_name()
        if os.path.exists(fullname):
            project_dir = os.path.dirname(fullname)
            root_dir = os.path.dirname(fullname)
            while (root_dir != os.path.dirname(root_dir)
                   and not os.path.exists(os.path.join(root_dir, '.git'))):
                root_dir = os.path.dirname(root_dir)
                if os.path.exists(os.path.join(root_dir, '.git')):
                    prefix = os.path.commonprefix([root_dir, project_dir])
                    return fullname[len(prefix) + 1:]
        return fullname
def repository_name ( self ) : fullname = self . full_name ( ) if os . path . exists ( fullname ) : project_dir = os . path . dirname ( fullname ) root_dir = os . path . dirname ( fullname ) while ( root_dir != os . path . dirname ( root_dir ) and not os . path . exists ( os . path . join ( root_dir , '.git' ) ) ) : root_dir = os . path . dirname ( root_dir ) if os . path . exists ( os . path . join ( root_dir , '.git' ) ) : prefix = os . path . commonprefix ( [ root_dir , project_dir ] ) return fullname [ len ( prefix ) + 1 : ] return fullname
Full name after removing the local path to the repository.
Full name after removing the local path to the repository .
"""Full name after removing the local path to the repository.

        If we have a real absolute path name here we can try to do something smart:
        detecting the root of the checkout and truncating /path/to/checkout from
        the name so that we get header guards that don't include things like
        "C:\Documents and Settings\..." or "/home/username/..." in them and thus
        people on different computers who have checked the source out to different
        locations won't see bogus errors.
        """ # Try to find a git top level directory by searching up from the current path. # Don't know what to do; header guard warnings may be wrong...
self