Skip to content

Commit

Permalink
Some minor fixes to the git dictionary
Browse files Browse the repository at this point in the history
See also: #1
  • Loading branch information
AnderssonPeter committed Jan 10, 2022
1 parent d663361 commit 7e4d20a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions PowerType/Dictionaries/git.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ $stashes = [DynamicSource]@{
Keys = @("--sparse");
Name = "sparse";
Description = "Allow updating index entries outside of the sparse-checkout cone. Normally, git add refuses to update index entries whose paths do not fit within the sparse-checkout cone, since those files might be removed from the working tree without warning. See git-sparse-checkout1 for more details.";
Condition = [LargerOrEqualCondition]::new($version, [Version]::'2.34.0')
Condition = [LargerOrEqualCondition]::new($version, [Version]'2.34.0')
},
[FlagParameter]@{
Keys = @("--interactive", "-i");
Expand Down Expand Up @@ -307,7 +307,7 @@ $stashes = [DynamicSource]@{
Keys = @("--trailer");
Name = "trailer";
Description = "Specify a (<token>, <value>) pair that should be applied as a trailer. (e.g. git commit --trailer `"Signed-off-by:C O Mitter \ &lt;[email protected]&gt;`" --trailer `"Helped-by:C O Mitter \ &lt;[email protected]&gt;`" will add the `"Signed-off-by`" trailer and the `"Helped-by`" trailer to the commit message.) The trailer.* configuration variables ( git-interpret-trailers1 ) can be used to define if a duplicated trailer is omitted, where in the run of trailers each trailer would appear, and other details.";
Condition = [LargerOrEqualCondition]::new($version, [Version]::'2.32.0')
Condition = [LargerOrEqualCondition]::new($version, [Version]'2.32.0')
},
[FlagParameter]@{
Keys = @("--verify", "--no-verify", "-n");
Expand Down Expand Up @@ -591,9 +591,10 @@ $stashes = [DynamicSource]@{
Name = "stash";
Description = "Stash the changes in a dirty working directory away";
Parameters = @(
[FlagParameter]@{
[CommandParameter]@{
Keys = @("list");
Name = "list";
Parameters = @()
},
[CommandParameter]@{
Keys = @("show");
Expand Down Expand Up @@ -695,9 +696,10 @@ $stashes = [DynamicSource]@{
}
)
},
[FlagParameter]@{
[CommandParameter]@{
Keys = @("clear");
Name = "clear";
Parameters = @()
},
[CommandParameter]@{
Keys = @("create");
Expand Down
2 changes: 1 addition & 1 deletion PowerType/Model/CommandParameter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ internal override void Initialize(ISystemTime systemTime)
internal override void Validate()
{
base.Validate();
if (Parameters == null || Parameters.Count == 0)
if (Parameters == null)
{
throw new ArgumentNullException(nameof(Parameters));
}
Expand Down

0 comments on commit 7e4d20a

Please sign in to comment.