mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-23 21:24:59 +00:00
refactor: commits only hold the end position of subject in body
This commit is contained in:
parent
064d04fccc
commit
b4e01a8b93
8 changed files with 27 additions and 41 deletions
|
@ -419,8 +419,7 @@ namespace SourceGit.ViewModels
|
|||
foreach (var c in _histories.Commits)
|
||||
{
|
||||
if (c.SHA.Contains(_searchCommitFilter, StringComparison.OrdinalIgnoreCase)
|
||||
|| c.Subject.Contains(_searchCommitFilter, StringComparison.OrdinalIgnoreCase)
|
||||
|| c.Message.Contains(_searchCommitFilter, StringComparison.OrdinalIgnoreCase)
|
||||
|| c.Body.Contains(_searchCommitFilter, StringComparison.OrdinalIgnoreCase)
|
||||
|| c.Author.Name.Contains(_searchCommitFilter, StringComparison.OrdinalIgnoreCase)
|
||||
|| c.Committer.Name.Contains(_searchCommitFilter, StringComparison.OrdinalIgnoreCase)
|
||||
|| c.Author.Email.Contains(_searchCommitFilter, StringComparison.OrdinalIgnoreCase)
|
||||
|
|
|
@ -22,13 +22,13 @@ namespace SourceGit.ViewModels
|
|||
{
|
||||
_repo = repo;
|
||||
Head = head;
|
||||
Message = head.FullMessage;
|
||||
Message = head.Body;
|
||||
View = new Views.Reword() { DataContext = this };
|
||||
}
|
||||
|
||||
public override Task<bool> Sure()
|
||||
{
|
||||
if (_message == Head.FullMessage)
|
||||
if (_message == Head.Body)
|
||||
return null;
|
||||
|
||||
_repo.SetWatcherEnabled(false);
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace SourceGit.ViewModels
|
|||
public Squash(Repository repo, Models.Commit head, Models.Commit parent)
|
||||
{
|
||||
_repo = repo;
|
||||
_message = parent.FullMessage;
|
||||
_message = parent.Body;
|
||||
Head = head;
|
||||
Parent = parent;
|
||||
View = new Views.Squash() { DataContext = this };
|
||||
|
|
|
@ -93,7 +93,7 @@ namespace SourceGit.ViewModels
|
|||
}
|
||||
else
|
||||
{
|
||||
CommitMessage = commits[0].FullMessage;
|
||||
CommitMessage = commits[0].Body;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue