Skip to content

Commit

Permalink
script/autobuild.py: add support git worktree
Browse files Browse the repository at this point in the history
.git is not always a directory, with 'git worktree' it's a file.

Signed-off-by: Stefan Metzmacher <[email protected]>
Reviewed-by: Andrew Bartlett <[email protected]>
  • Loading branch information
metze-samba committed Apr 2, 2020
1 parent 579c27f commit f9374d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion script/autobuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def find_git_root():
'''get to the top of the git repo'''
p = os.getcwd()
while p != '/':
if os.path.isdir(os.path.join(p, ".git")):
if os.path.exists(os.path.join(p, ".git")):
return p
p = os.path.abspath(os.path.join(p, '..'))
return None
Expand Down

0 comments on commit f9374d0

Please sign in to comment.