mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 12:45:00 +00:00
refactor: pass Models.Commit instead of just sha of it
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
ba3c72585d
commit
2f9e825b63
3 changed files with 5 additions and 5 deletions
|
@ -10,12 +10,12 @@ namespace SourceGit.ViewModels
|
|||
private set;
|
||||
}
|
||||
|
||||
public ExecuteCustomAction(Repository repo, Models.CustomAction action, string sha)
|
||||
public ExecuteCustomAction(Repository repo, Models.CustomAction action, Models.Commit commit)
|
||||
{
|
||||
_repo = repo;
|
||||
_args = action.Arguments.Replace("${REPO}", _repo.FullPath);
|
||||
if (!string.IsNullOrEmpty(sha))
|
||||
_args = _args.Replace("${SHA}", sha);
|
||||
if (commit != null)
|
||||
_args = _args.Replace("${SHA}", commit.SHA);
|
||||
|
||||
CustomAction = action;
|
||||
View = new Views.ExecuteCustomAction() { DataContext = this };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue