diff --git a/Walrus.CLI/Commands/QueryCommand.cs b/Walrus.CLI/Commands/QueryCommand.cs index ddc295d..9cc289d 100644 --- a/Walrus.CLI/Commands/QueryCommand.cs +++ b/Walrus.CLI/Commands/QueryCommand.cs @@ -20,34 +20,35 @@ public QueryCommand(IWalrusService walrus, ILogger logger) : base( _logger = logger; Command.AddOption(new Option( - "--after", + new[] {"--after", "-a"}, () => DateTime.Now.AddDays(-7), "Return commits on or after this date. Defaults to one week ago.")); Command.AddOption(new Option( - "--before", + new[] {"--before", "-b"}, () => DateTime.Now.AddDays(1), "Return commits before this date. Defaults to tomorrow.")); + // All branches is slow so no short alias will be provided Command.AddOption(new Option( "--all-branches", "Include all *local* branches in search" )); Command.AddOption(new Option( - "--author-email", + new[] {"--author-email", "-e"}, "Return commits from this author. Takes precendence over --author-alias.")); Command.AddOption(new Option( - "--author-alias", + new[] {"--author-alias", "-u"}, "Return commits from any alias of this author")); Command.AddOption(new Option( - "--repo-name", + new[] {"--repo-name", "-r"}, "Return commits from this repository. Case insensitive.")); Command.AddOption(new Option( - "--group-by", + new[] {"--group-by", "-g"}, "Result grouping method" )); @@ -71,7 +72,7 @@ public QueryCommand(IWalrusService walrus, ILogger logger) : base( /// Query to execute private void HandleQuery(WalrusQuery query) { - _logger.LogDebug("HandleQuery: {query}", query); + _logger.LogDebug("HandleQuery: {Query}", query); var commits = Walrus.ExecuteQuery(query); diff --git a/Walrus.Core/WalrusQuery.cs b/Walrus.Core/WalrusQuery.cs index 2eb96a5..7826081 100644 --- a/Walrus.Core/WalrusQuery.cs +++ b/Walrus.Core/WalrusQuery.cs @@ -104,7 +104,7 @@ config.AuthorAliases is not null && /// public override string ToString() { - return $"After={After}, Before={Before}, AllBranches={AllBranches}, Author.Email={AuthorEmail}, Author.Alias={AuthorAlias}, Grouping={GroupBy}"; + return $"After={After}, Before={Before}, AllBranches={AllBranches}, Repo={RepoName}, Author.Email={AuthorEmail}, Author.Alias={AuthorAlias}, Grouping={GroupBy}"; } public enum QueryGrouping @@ -115,7 +115,7 @@ public enum QueryGrouping Repo, /// - /// Group commits by date (specifcally by day) + /// Group commits by date (specifically by day) /// Date,