mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-24 05:35:00 +00:00
feature: git command logs
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
928a0ad3c5
commit
8b39df32cc
101 changed files with 1040 additions and 573 deletions
|
@ -22,7 +22,7 @@ namespace SourceGit.ViewModels
|
|||
set;
|
||||
} = false;
|
||||
|
||||
public ApplyStash(string repo, Models.Stash stash)
|
||||
public ApplyStash(Repository repo, Models.Stash stash)
|
||||
{
|
||||
_repo = repo;
|
||||
Stash = stash;
|
||||
|
@ -33,16 +33,18 @@ namespace SourceGit.ViewModels
|
|||
{
|
||||
ProgressDescription = $"Applying stash: {Stash.Name}";
|
||||
|
||||
var log = _repo.CreateLog("Apply Stash");
|
||||
return Task.Run(() =>
|
||||
{
|
||||
var succ = new Commands.Stash(_repo).Apply(Stash.Name, RestoreIndex);
|
||||
var succ = new Commands.Stash(_repo.FullPath).Use(log).Apply(Stash.Name, RestoreIndex);
|
||||
if (succ && DropAfterApply)
|
||||
new Commands.Stash(_repo).Drop(Stash.Name);
|
||||
new Commands.Stash(_repo.FullPath).Use(log).Drop(Stash.Name);
|
||||
|
||||
log.Complete();
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
private readonly string _repo;
|
||||
private readonly Repository _repo;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue