Skip to content

Commit

Permalink
more changes to add status
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b committed Aug 19, 2024
1 parent d826532 commit dada084
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions git_fleximod/submodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ def status(self):
rootgit = GitInterface(self.root_dir, self.logger)
# submodule commands use path, not name
status, tags = rootgit.git_operation("ls-remote", "--tags", self.url)
status, result = rootgit.git_operation("submodule","status",smpath).split()
status, result = rootgit.git_operation("submodule","status",smpath)
result = result.split()

if result:
ahash = result[0][1:]
Expand Down Expand Up @@ -153,7 +154,7 @@ def status(self):
status, output = git.git_operation("status", "--ignore-submodules", "-uno")
if "nothing to commit" not in output:
localmods = True
result = "M" + textwrap.indent(status, " ")
result = "M" + textwrap.indent(output, " ")
# print(f"result {result} needsupdate {needsupdate} localmods {localmods} testfails {testfails}")
return result, needsupdate, localmods, testfails

Expand Down Expand Up @@ -225,10 +226,9 @@ def sparse_checkout(self):
rootdotgit = os.path.join(self.root_dir, ".git")
while os.path.isfile(rootdotgit):
with open(rootdotgit) as f:
line = f.readline()
line = f.readline().rstrip()
if line.startswith("gitdir: "):
rootdotgit = os.path.abspath(os.path.join(self.root_dir,line[8:]))

assert os.path.isdir(rootdotgit)
# first create the module directory
if not os.path.isdir(os.path.join(self.root_dir, self.path)):
Expand Down

0 comments on commit dada084

Please sign in to comment.