mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 04:34:59 +00:00
enhance: show reverting commit in banner while reverting is in-progress
This commit is contained in:
parent
2dd9cab695
commit
93d9a04460
6 changed files with 36 additions and 9 deletions
|
@ -93,7 +93,7 @@ namespace SourceGit.ViewModels
|
|||
public CherryPickInProgress(Repository repo) : base(repo.FullPath, "cherry-pick", true)
|
||||
{
|
||||
var headSHA = File.ReadAllText(Path.Combine(repo.GitDir, "CHERRY_PICK_HEAD")).Trim();
|
||||
Head = new Commands.QuerySingleCommit(repo.FullPath, headSHA).Result();
|
||||
Head = new Commands.QuerySingleCommit(repo.FullPath, headSHA).Result() ?? new Models.Commit() { SHA = headSHA };
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -171,7 +171,17 @@ namespace SourceGit.ViewModels
|
|||
|
||||
public class RevertInProgress : InProgressContext
|
||||
{
|
||||
public RevertInProgress(Repository repo) : base(repo.FullPath, "revert", false) { }
|
||||
public Models.Commit Head
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
public RevertInProgress(Repository repo) : base(repo.FullPath, "revert", false)
|
||||
{
|
||||
var headSHA = File.ReadAllText(Path.Combine(repo.GitDir, "REVERT_HEAD")).Trim();
|
||||
Head = new Commands.QuerySingleCommit(repo.FullPath, headSHA).Result() ?? new Models.Commit() { SHA = headSHA };
|
||||
}
|
||||
}
|
||||
|
||||
public class MergeInProgress : InProgressContext
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue