mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 04:04:59 +00:00
refactor: rewrite submodule to support IsDirty
state (#339)
This commit is contained in:
parent
eb441852b0
commit
1fe2be11a7
10 changed files with 110 additions and 19 deletions
|
@ -17,9 +17,10 @@ namespace SourceGit.Commands
|
|||
Args = "submodule status";
|
||||
}
|
||||
|
||||
public List<string> Result()
|
||||
public List<Models.Submodule> Result()
|
||||
{
|
||||
Exec();
|
||||
new UpdateSubmoduleStatus(WorkingDirectory, _submodules).Result();
|
||||
return _submodules;
|
||||
}
|
||||
|
||||
|
@ -28,17 +29,17 @@ namespace SourceGit.Commands
|
|||
var match = REG_FORMAT1().Match(line);
|
||||
if (match.Success)
|
||||
{
|
||||
_submodules.Add(match.Groups[1].Value);
|
||||
_submodules.Add(new Models.Submodule() { Path = match.Groups[1].Value });
|
||||
return;
|
||||
}
|
||||
|
||||
match = REG_FORMAT2().Match(line);
|
||||
if (match.Success)
|
||||
{
|
||||
_submodules.Add(match.Groups[1].Value);
|
||||
_submodules.Add(new Models.Submodule() { Path = match.Groups[1].Value });
|
||||
}
|
||||
}
|
||||
|
||||
private readonly List<string> _submodules = new List<string>();
|
||||
private readonly List<Models.Submodule> _submodules = new List<Models.Submodule>();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue