Skip to content

Commit

Permalink
Mapping git commit -CommitDate to --date (Fixes #184)
Browse files Browse the repository at this point in the history
  • Loading branch information
James Brundage committed Oct 5, 2023
1 parent 5fa4f0d commit accaec1
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Extensions/Git.Commit.Input.UGit.Extension.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,13 @@ $Trailers,

# If set, will amend an existing commit.
[switch]
$Amend
$Amend,

# The commit date.
[Parameter(ValueFromPipelineByPropertyName)]
[Alias('Date','Time','DateTime','Timestamp')]
[datetime]
$CommitDate
)


Expand Down Expand Up @@ -63,4 +69,9 @@ if ($Trailers) {

if ($amend) {
"--amend"
}

if ($CommitDate) {
"--date"
$CommitDate.ToString("o")
}

0 comments on commit accaec1

Please sign in to comment.