mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 12:15: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
|
@ -5,13 +5,13 @@ namespace SourceGit.Commands
|
|||
{
|
||||
public static class Discard
|
||||
{
|
||||
public static void All(string repo, bool includeIgnored)
|
||||
public static void All(string repo, bool includeIgnored, Models.ICommandLog log)
|
||||
{
|
||||
new Restore(repo).Exec();
|
||||
new Clean(repo, includeIgnored).Exec();
|
||||
new Restore(repo).Use(log).Exec();
|
||||
new Clean(repo, includeIgnored).Use(log).Exec();
|
||||
}
|
||||
|
||||
public static void Changes(string repo, List<Models.Change> changes)
|
||||
public static void Changes(string repo, List<Models.Change> changes, Models.ICommandLog log)
|
||||
{
|
||||
var needClean = new List<string>();
|
||||
var needCheckout = new List<string>();
|
||||
|
@ -27,13 +27,13 @@ namespace SourceGit.Commands
|
|||
for (int i = 0; i < needClean.Count; i += 10)
|
||||
{
|
||||
var count = Math.Min(10, needClean.Count - i);
|
||||
new Clean(repo, needClean.GetRange(i, count)).Exec();
|
||||
new Clean(repo, needClean.GetRange(i, count)).Use(log).Exec();
|
||||
}
|
||||
|
||||
for (int i = 0; i < needCheckout.Count; i += 10)
|
||||
{
|
||||
var count = Math.Min(10, needCheckout.Count - i);
|
||||
new Restore(repo, needCheckout.GetRange(i, count), "--worktree --recurse-submodules").Exec();
|
||||
new Restore(repo, needCheckout.GetRange(i, count), "--worktree --recurse-submodules").Use(log).Exec();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue