Skip to content

Commit

Permalink
BF: to decide if Git repo, just check if .git exists
Browse files Browse the repository at this point in the history
.git could be a symbolic link to the corresponding .git/ directory
(e.g. if a submodule with "old fashion" submodule referencing) or
.git file which would have a line with "gitdir: " pointing to the
actual location for that workdir or submodule

Closes airspeed-velocity#516
  • Loading branch information
yarikoptic committed May 16, 2018
1 parent 92c072a commit faaea14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion asv/plugins/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def __init__(self, url, mirror_path):
@classmethod
def is_local_repo(cls, path):
return os.path.isdir(path) and (
os.path.isdir(os.path.join(path, '.git')) or
os.path.exists(os.path.join(path, '.git')) or
os.path.isdir(os.path.join(path, 'objects')))

@classmethod
Expand Down

0 comments on commit faaea14

Please sign in to comment.