mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-23 20:47:25 -08:00
optimize<WorkingCopy>: do NOT show unmerged changes in staged
This commit is contained in:
parent
08f279a521
commit
6613566afb
3 changed files with 5 additions and 9 deletions
|
@ -33,13 +33,6 @@ namespace SourceGit.Models {
|
||||||
public string Path { get; set; } = "";
|
public string Path { get; set; } = "";
|
||||||
public string OriginalPath { get; set; } = "";
|
public string OriginalPath { get; set; } = "";
|
||||||
|
|
||||||
public bool IsAddedToIndex {
|
|
||||||
get {
|
|
||||||
if (Index == Status.None || Index == Status.Untracked) return false;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool IsConflit {
|
public bool IsConflit {
|
||||||
get {
|
get {
|
||||||
if (Index == Status.Unmerged || WorkTree == Status.Unmerged) return true;
|
if (Index == Status.Unmerged || WorkTree == Status.Unmerged) return true;
|
||||||
|
|
|
@ -102,7 +102,7 @@ namespace SourceGit.Views.Controls {
|
||||||
case Models.Change.Status.Deleted: return "▬";
|
case Models.Change.Status.Deleted: return "▬";
|
||||||
case Models.Change.Status.Renamed: return "➔";
|
case Models.Change.Status.Renamed: return "➔";
|
||||||
case Models.Change.Status.Copied: return "❏";
|
case Models.Change.Status.Copied: return "❏";
|
||||||
case Models.Change.Status.Unmerged: return "∪";
|
case Models.Change.Status.Unmerged: return "U";
|
||||||
case Models.Change.Status.Untracked: return "★";
|
case Models.Change.Status.Untracked: return "★";
|
||||||
default: return "?";
|
default: return "?";
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,10 @@ namespace SourceGit.Views.Widgets {
|
||||||
List<Models.Change> stagedChanges = new List<Models.Change>();
|
List<Models.Change> stagedChanges = new List<Models.Change>();
|
||||||
|
|
||||||
foreach (var c in changes) {
|
foreach (var c in changes) {
|
||||||
if (c.IsAddedToIndex) {
|
if (c.Index == Models.Change.Status.Modified
|
||||||
|
|| c.Index == Models.Change.Status.Added
|
||||||
|
|| c.Index == Models.Change.Status.Deleted
|
||||||
|
|| c.Index == Models.Change.Status.Renamed) {
|
||||||
stagedChanges.Add(c);
|
stagedChanges.Add(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue