Skip to content

Commit

Permalink
Add --all option to git log arguments (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
jzebedee authored Apr 16, 2019
1 parent ba7616f commit 04c310c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/corgit/GitArguments.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,13 @@ public struct LogOptions
{
public readonly int? MaxEntries;
public readonly bool Reverse;
public readonly bool All;

public LogOptions(int? maxEntries = 32, bool reverse = false)
public LogOptions(int? maxEntries = 32, bool reverse = false, bool all = false)
{
MaxEntries = maxEntries;
Reverse = reverse;
All = all;
}
}
public static IEnumerable<string> Log(LogOptions options = default, IEnumerable<string> paths = null)
Expand All @@ -94,6 +96,11 @@ public static IEnumerable<string> Log(LogOptions options = default, IEnumerable<
yield return "--reverse";
}

if(options.All)
{
yield return "--all";
}

if (paths != null)
{
yield return "--";
Expand Down

0 comments on commit 04c310c

Please sign in to comment.