mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 04:34:59 +00:00
cleanup<*>: run vs code cleanup to format codestyle and remove unused references
This commit is contained in:
parent
37559b60d4
commit
2cf7192ec4
41 changed files with 77 additions and 89 deletions
|
@ -45,7 +45,7 @@ namespace SourceGit.Commands {
|
|||
var when = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddSeconds(timestamp).ToLocalTime().ToString("yyyy-MM-dd HH:mm:ss");
|
||||
|
||||
var blameLine = new Models.BlameLine() {
|
||||
LineNumber = $"{data.Lines.Count+1}",
|
||||
LineNumber = $"{data.Lines.Count + 1}",
|
||||
CommitSHA = commit,
|
||||
Author = author,
|
||||
Time = when,
|
||||
|
|
|
@ -101,7 +101,7 @@ namespace SourceGit.Commands {
|
|||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (string.IsNullOrEmpty(e.Data)) return;
|
||||
if (TraitErrorAsOutput) OnReadline(e.Data);
|
||||
|
||||
|
@ -147,7 +147,7 @@ namespace SourceGit.Commands {
|
|||
start.StandardErrorEncoding = Encoding.UTF8;
|
||||
|
||||
if (!string.IsNullOrEmpty(Cwd)) start.WorkingDirectory = Cwd;
|
||||
|
||||
|
||||
var proc = new Process() { StartInfo = start };
|
||||
try {
|
||||
proc.Start();
|
||||
|
@ -174,6 +174,6 @@ namespace SourceGit.Commands {
|
|||
/// 调用Exec时的读取函数
|
||||
/// </summary>
|
||||
/// <param name="line"></param>
|
||||
public virtual void OnReadline(string line) {}
|
||||
public virtual void OnReadline(string line) { }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -117,7 +117,7 @@ namespace SourceGit.Commands {
|
|||
}
|
||||
}
|
||||
|
||||
decorators.Sort((l, r) => {
|
||||
decorators.Sort((l, r) => {
|
||||
if (l.Type != r.Type) {
|
||||
return (int)l.Type - (int)r.Type;
|
||||
} else {
|
||||
|
|
|
@ -4,7 +4,7 @@ namespace SourceGit.Commands {
|
|||
/// </summary>
|
||||
public class Config : Command {
|
||||
|
||||
public Config() {}
|
||||
public Config() { }
|
||||
|
||||
public Config(string repo) {
|
||||
Cwd = repo;
|
||||
|
|
|
@ -71,7 +71,7 @@ namespace SourceGit.Commands {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void ProcessChanges() {
|
||||
if (deleted.Any()) {
|
||||
if (added.Count == deleted.Count) {
|
||||
|
|
|
@ -12,7 +12,7 @@ namespace SourceGit.Commands {
|
|||
this.repo = repo;
|
||||
}
|
||||
|
||||
public void Whole() {
|
||||
public void Whole() {
|
||||
new Reset(repo, "HEAD", "--hard").Exec();
|
||||
new Clean(repo).Exec();
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ namespace SourceGit.Commands {
|
|||
private void OnTick(object o) {
|
||||
var now = DateTime.Now.ToFileTime();
|
||||
if (nextFetchPoint > now) return;
|
||||
|
||||
|
||||
Models.Watcher.SetEnabled(cmd.Cwd, false);
|
||||
cmd.Exec();
|
||||
nextFetchPoint = DateTime.Now.AddMinutes(10).ToFileTime();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue