mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 12:15:00 +00:00
refactor: use --format=<format>
instead of --pretty=format:<format>
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
808302ce84
commit
8d47bd5cd9
7 changed files with 8 additions and 10 deletions
|
@ -6,7 +6,7 @@ namespace SourceGit.Commands
|
||||||
{
|
{
|
||||||
WorkingDirectory = repo;
|
WorkingDirectory = repo;
|
||||||
Context = repo;
|
Context = repo;
|
||||||
Args = $"show --no-show-signature --pretty=format:%B -s {sha}";
|
Args = $"show --no-show-signature --format=%B -s {sha}";
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Result()
|
public string Result()
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
using System;
|
namespace SourceGit.Commands
|
||||||
|
|
||||||
namespace SourceGit.Commands
|
|
||||||
{
|
{
|
||||||
public class QueryCommitSignInfo : Command
|
public class QueryCommitSignInfo : Command
|
||||||
{
|
{
|
||||||
|
@ -9,7 +7,7 @@ namespace SourceGit.Commands
|
||||||
WorkingDirectory = repo;
|
WorkingDirectory = repo;
|
||||||
Context = repo;
|
Context = repo;
|
||||||
|
|
||||||
const string baseArgs = "show --no-show-signature --pretty=format:\"%G?%n%GS%n%GK\" -s";
|
const string baseArgs = "show --no-show-signature --format=%G?%n%GS%n%GK -s";
|
||||||
const string fakeSignersFileArg = "-c gpg.ssh.allowedSignersFile=/dev/null";
|
const string fakeSignersFileArg = "-c gpg.ssh.allowedSignersFile=/dev/null";
|
||||||
Args = $"{(useFakeSignersFile ? fakeSignersFileArg : string.Empty)} {baseArgs} {sha}";
|
Args = $"{(useFakeSignersFile ? fakeSignersFileArg : string.Empty)} {baseArgs} {sha}";
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,7 @@ namespace SourceGit.Commands
|
||||||
|
|
||||||
WorkingDirectory = repo;
|
WorkingDirectory = repo;
|
||||||
Context = repo;
|
Context = repo;
|
||||||
Args = $"log -1000 --date-order --no-show-signature --decorate=full --pretty=format:%H%n%P%n%D%n%aN±%aE%n%at%n%cN±%cE%n%ct%n%s " + search;
|
Args = $"log -1000 --date-order --no-show-signature --decorate=full --format=%H%n%P%n%D%n%aN±%aE%n%at%n%cN±%cE%n%ct%n%s " + search;
|
||||||
_findFirstMerged = false;
|
_findFirstMerged = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ namespace SourceGit.Commands
|
||||||
|
|
||||||
WorkingDirectory = repo;
|
WorkingDirectory = repo;
|
||||||
Context = repo;
|
Context = repo;
|
||||||
Args = $"log --date-order --no-show-signature --decorate=full --pretty=format:\"%H%n%P%n%D%n%aN±%aE%n%at%n%cN±%cE%n%ct%n%B%n{_boundary}\" {on}..HEAD";
|
Args = $"log --date-order --no-show-signature --decorate=full --format=\"%H%n%P%n%D%n%aN±%aE%n%at%n%cN±%cE%n%ct%n%B%n{_boundary}\" {on}..HEAD";
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Models.InteractiveCommit> Result()
|
public List<Models.InteractiveCommit> Result()
|
||||||
|
|
|
@ -8,7 +8,7 @@ namespace SourceGit.Commands
|
||||||
{
|
{
|
||||||
WorkingDirectory = repo;
|
WorkingDirectory = repo;
|
||||||
Context = repo;
|
Context = repo;
|
||||||
Args = $"show --no-show-signature --decorate=full --pretty=format:%H%n%P%n%D%n%aN±%aE%n%at%n%cN±%cE%n%ct%n%s -s {sha}";
|
Args = $"show --no-show-signature --decorate=full --format=%H%n%P%n%D%n%aN±%aE%n%at%n%cN±%cE%n%ct%n%s -s {sha}";
|
||||||
}
|
}
|
||||||
|
|
||||||
public Models.Commit Result()
|
public Models.Commit Result()
|
||||||
|
|
|
@ -9,7 +9,7 @@ namespace SourceGit.Commands
|
||||||
{
|
{
|
||||||
WorkingDirectory = repo;
|
WorkingDirectory = repo;
|
||||||
Context = repo;
|
Context = repo;
|
||||||
Args = "stash list --pretty=format:%H%n%P%n%ct%n%gd%n%s";
|
Args = "stash list --format=%H%n%P%n%ct%n%gd%n%s";
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Models.Stash> Result()
|
public List<Models.Stash> Result()
|
||||||
|
|
|
@ -8,7 +8,7 @@ namespace SourceGit.Commands
|
||||||
{
|
{
|
||||||
WorkingDirectory = repo;
|
WorkingDirectory = repo;
|
||||||
Context = repo;
|
Context = repo;
|
||||||
Args = $"log --date-order --branches --remotes -{max} --pretty=format:\"%ct$%aN\"";
|
Args = $"log --date-order --branches --remotes -{max} --format=%ct$%aN";
|
||||||
}
|
}
|
||||||
|
|
||||||
public Models.Statistics Result()
|
public Models.Statistics Result()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue