diff options
author | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2020-03-30 12:15:07 -0400 |
---|---|---|
committer | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2020-03-30 12:15:07 -0400 |
commit | df1776a39a8df7e140ae3e62efe4c82895a1e91c (patch) | |
tree | 93f6e546f80f1e54227d28d2f1c178d2591d3cb4 /b4/__init__.py | |
parent | e110a35e7ea0a1c2bb3c350487a9fe34984592bf (diff) | |
download | b4-df1776a39a8df7e140ae3e62efe4c82895a1e91c.tar.gz |
PR: fix when gitdir is specified via -g
Fix some leftover bugs from prototyping stage when we were always
assuming to run from a checkout.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Diffstat (limited to 'b4/__init__.py')
-rw-r--r-- | b4/__init__.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/b4/__init__.py b/b4/__init__.py index 0f0b76c..b4ce2d4 100644 --- a/b4/__init__.py +++ b/b4/__init__.py @@ -1267,6 +1267,8 @@ def gpg_run_command(args, stdin=None, logstderr=False): def git_run_command(gitdir, args, stdin=None, logstderr=False): cmdargs = ['git', '--no-pager'] if gitdir: + if os.path.isdir(os.path.join(gitdir, '.git')): + gitdir = os.path.join(gitdir, '.git') cmdargs += ['--git-dir', gitdir] cmdargs += args |