diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2012-10-29 10:37:02 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2012-11-24 12:20:54 +0100 |
commit | 03cdea0f8a0fde5a251c6d9f666323b86b2a88c1 (patch) | |
tree | 460fd1069d28cc92f44d113de975aa0180518a1f | |
parent | 3362147479b89918a09efc8a698111e28c78f10c (diff) |
GitRepository/has_submodules: use correct .gitmodules file
Examine .gitmodules from the "root directory" of the repo, not the
current working directory. Fixes has_submodules() method, when called
from arbitrary cwd.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
-rw-r--r-- | gbp/git/repository.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gbp/git/repository.py b/gbp/git/repository.py index 265ea3f..5c13e40 100644 --- a/gbp/git/repository.py +++ b/gbp/git/repository.py @@ -1446,7 +1446,7 @@ class GitRepository(object): otherwise @rtype: C{bool} """ - if os.path.exists('.gitmodules'): + if os.path.exists(os.path.join(self.path, '.gitmodules')): return True else: return False |