Skip to content

Commit

Permalink
fix status issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b committed Jun 5, 2024
1 parent c304487 commit d95f5d6
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions git_fleximod/git_fleximod.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,15 +298,22 @@ def submodules_status(gitmodules, root_dir, toplevel=False):
# submodule commands use path, not name
url = url.replace("[email protected]:", "https://github.com/")
tags = rootgit.git_operation("ls-remote", "--tags", url)
ahash = rootgit.git_operation("submodule","status",newpath).split()[0][1:]
hhash = None
atag = None
needsupdate += 1
if not toplevel and level:
continue
for htag in tags.split("\n"):
if tag and tag in htag:
if htag.endswith('^{}'):
htag = htag[:-3]
if not atag and ahash in htag:
atag = (htag.split()[1])[10:]
if not hhash and htag.endswith(tag):
hhash = htag.split()[0]
if hhash and atag:
break
if tag and tag == atag:
if tag and (ahash == hhash or atag == tag):
print(f"e {name:>20} not checked out, aligned at tag {tag}")
elif tag:
ahash = rootgit.git_operation(
Expand Down

0 comments on commit d95f5d6

Please sign in to comment.