diff --git a/git_fleximod/git_fleximod.py b/git_fleximod/git_fleximod.py index a847c9fc6b..b0a5a33070 100755 --- a/git_fleximod/git_fleximod.py +++ b/git_fleximod/git_fleximod.py @@ -309,7 +309,7 @@ def submodules_status(gitmodules, root_dir, toplevel=False): htag = htag[:-3] if not atag and ahash in htag: atag = (htag.split()[1])[10:] - if not hhash and htag.endswith(tag): + if tag and not hhash and htag.endswith(tag): hhash = htag.split()[0] if hhash and atag: break