diff --git a/LibGit2Sharp/RepositoryStatus.cs b/LibGit2Sharp/RepositoryStatus.cs index 63172e8c4..2a8839fbb 100644 --- a/LibGit2Sharp/RepositoryStatus.cs +++ b/LibGit2Sharp/RepositoryStatus.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using System.Diagnostics; +using System.Globalization; using System.Linq; using LibGit2Sharp.Core; using LibGit2Sharp.Core.Compat; @@ -12,6 +13,7 @@ namespace LibGit2Sharp /// Holds the result of the determination of the state of the working directory. /// Only files that differ from the current index and/or commit will be considered. /// + [DebuggerDisplay("{DebuggerDisplay,nq}")] public class RepositoryStatus : IEnumerable { private readonly ICollection statusEntries; @@ -173,5 +175,18 @@ public virtual bool IsDirty { get { return isDirty; } } + + private string DebuggerDisplay + { + get + { + return string.Format( + CultureInfo.InvariantCulture, + "+{0} ~{1} -{2} | +{3} ~{4} -{5} | i{6}", + Added.Count(), Staged.Count(), Removed.Count(), + Untracked.Count(), Modified.Count(), Missing.Count(), + Ignored.Count()); + } + } } } diff --git a/LibGit2Sharp/StatusEntry.cs b/LibGit2Sharp/StatusEntry.cs index 4eb8850fc..9fad0fb87 100644 --- a/LibGit2Sharp/StatusEntry.cs +++ b/LibGit2Sharp/StatusEntry.cs @@ -1,4 +1,5 @@ using System; +using System.Diagnostics; using LibGit2Sharp.Core; namespace LibGit2Sharp @@ -6,6 +7,7 @@ namespace LibGit2Sharp /// /// Holds the calculated status of a particular file at a particular instant. /// + [DebuggerDisplay("{DebuggerDisplay,nq}")] public class StatusEntry : IEquatable { private readonly string filePath; @@ -92,5 +94,10 @@ public override int GetHashCode() { return !Equals(left, right); } + + private string DebuggerDisplay + { + get { return string.Format("{0}: {1}", State, FilePath); } + } } } diff --git a/LibGit2Sharp/TreeChanges.cs b/LibGit2Sharp/TreeChanges.cs index 5184362d5..a162b36a5 100644 --- a/LibGit2Sharp/TreeChanges.cs +++ b/LibGit2Sharp/TreeChanges.cs @@ -215,7 +215,7 @@ private string DebuggerDisplay get { return string.Format(CultureInfo.InvariantCulture, - "Add: {0}, Del: {1}, Mod: {2}, Typ: {3}", + "+{0} ~{2} -{1} \u00B1{3}", Added.Count(), Deleted.Count(), Modified.Count(), TypeChanged.Count()); }