mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 04:34:59 +00:00
code_review: review for PR (#147)
* code style * localizations for zh_CN
This commit is contained in:
parent
e00bc4e630
commit
66f2aab6a7
11 changed files with 43 additions and 51 deletions
|
@ -4,7 +4,7 @@ namespace SourceGit.ViewModels
|
|||
{
|
||||
public class CheckoutCommit: Popup
|
||||
{
|
||||
public string Commit
|
||||
public Models.Commit Commit
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
|
@ -21,7 +21,7 @@ namespace SourceGit.ViewModels
|
|||
set => SetProperty(ref _autoStash, value);
|
||||
}
|
||||
|
||||
public CheckoutCommit(Repository repo, string commit)
|
||||
public CheckoutCommit(Repository repo, Models.Commit commit)
|
||||
{
|
||||
_repo = repo;
|
||||
Commit = commit;
|
||||
|
@ -31,7 +31,7 @@ namespace SourceGit.ViewModels
|
|||
public override Task<bool> Sure()
|
||||
{
|
||||
_repo.SetWatcherEnabled(false);
|
||||
ProgressDescription = $"Checkout Commit '{Commit}' ...";
|
||||
ProgressDescription = $"Checkout Commit '{Commit.SHA}' ...";
|
||||
|
||||
return Task.Run(() =>
|
||||
{
|
||||
|
@ -64,7 +64,7 @@ namespace SourceGit.ViewModels
|
|||
}
|
||||
|
||||
SetProgressDescription("Checkout commit ...");
|
||||
var rs = new Commands.Checkout(_repo.FullPath).Commit(Commit, SetProgressDescription);
|
||||
var rs = new Commands.Checkout(_repo.FullPath).Commit(Commit.SHA, SetProgressDescription);
|
||||
|
||||
if (needPopStash)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue