From 088b7da7bdbe9bfd41fea13077efe9f50b378a12 Mon Sep 17 00:00:00 2001 From: James Brundage <@github.com> Date: Wed, 4 Oct 2023 21:59:23 -0700 Subject: [PATCH 01/55] Supporting git submodule status (Fixes #183) --- Extensions/Git.SubModule.UGit.extension.ps1 | 36 +++++++++++++++++++++ Formatting/Git.Submodule.format.ps1 | 1 + 2 files changed, 37 insertions(+) create mode 100644 Extensions/Git.SubModule.UGit.extension.ps1 create mode 100644 Formatting/Git.Submodule.format.ps1 diff --git a/Extensions/Git.SubModule.UGit.extension.ps1 b/Extensions/Git.SubModule.UGit.extension.ps1 new file mode 100644 index 00000000..8f8a417b --- /dev/null +++ b/Extensions/Git.SubModule.UGit.extension.ps1 @@ -0,0 +1,36 @@ +<# +.Synopsis + Git Submodule Extension +.Description + Git Submodule as objects. +.EXAMPLE + git submodule +#> +[Management.Automation.Cmdlet("Out","Git")] # It's an extension for Out-Git +[ValidatePattern("^(?:git)\s(?:submodule)\s(?:status)?$")] # that is run when git submodule is run (with no other options (except for status)). +param() + +begin { + $submoduleLines = @() +} + +process { + $submoduleLines += $gitOut +} + +end { + if ($gitArgument -match '--(?>n|dry-run)') { + return $submoduleLines + } + + foreach ($line in $submoduleLines) { + if ($line -match '^\s{0,}[\+]?(?[0-9a-f]{10,})\s(?\S+)\s\((?[^\)]+)\)') { + $Matches.Remove(0) + $toObject = [Ordered]@{ + PSTypeName = 'git.submodule.status' + GitOutputLines = $submoduleLines + } + $Matches + [PSCustomObject]$toObject + } + } +} diff --git a/Formatting/Git.Submodule.format.ps1 b/Formatting/Git.Submodule.format.ps1 new file mode 100644 index 00000000..12c20ab3 --- /dev/null +++ b/Formatting/Git.Submodule.format.ps1 @@ -0,0 +1 @@ +Write-FormatView -TypeName git.submodule.status -Property Submodule, Reference, CommitHash \ No newline at end of file From 65586235ffba6cad51e298a7a672d01275abbef1 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 5 Oct 2023 05:00:19 +0000 Subject: [PATCH 02/55] Supporting git submodule status (Fixes #183) --- assets/ugit.svg | 1 + 1 file changed, 1 insertion(+) diff --git a/assets/ugit.svg b/assets/ugit.svg index 4a8fdd5d..50bffdb4 100644 --- a/assets/ugit.svg +++ b/assets/ugit.svg @@ -1,4 +1,5 @@ + From 3410ea661f743c2b9ca9150da7e6f6e29fc175c9 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 5 Oct 2023 05:00:40 +0000 Subject: [PATCH 03/55] Supporting git submodule status (Fixes #183) --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index f25707c8..1edb714f 100644 --- a/README.md +++ b/README.md @@ -378,6 +378,13 @@ You might want to try giving some of these a try. git status | Select-Object -ExpandProperty Untracked ~~~ +### Git.SubModule Example 1 + + +~~~PowerShell + git submodule +~~~ + ## Out-Git Extensions ### Git Commands @@ -441,6 +448,9 @@ Most extensions handle output from a single git command. * [Git Status](docs/Git.Status-Extension.md) + +* [Git SubModule](docs/Git.SubModule-Extension.md) + ### Additional Output Extensions From 04063b92c4feb82033b963e6c66aeef360412deb Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 5 Oct 2023 05:01:11 +0000 Subject: [PATCH 04/55] Supporting git submodule status (Fixes #183) --- Get-UGitExtension.ps1 | 82 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 74 insertions(+), 8 deletions(-) diff --git a/Get-UGitExtension.ps1 b/Get-UGitExtension.ps1 index 9d63f973..4c54f7dc 100644 --- a/Get-UGitExtension.ps1 +++ b/Get-UGitExtension.ps1 @@ -1,4 +1,4 @@ -#region Piecemeal [ 0.3.10 ] : Easy Extensible Plugins for PowerShell +#region Piecemeal [ 0.4.1 ] : Easy Extensible Plugins for PowerShell # Install-Module Piecemeal -Scope CurrentUser # Import-Module Piecemeal -Force # Install-Piecemeal -ExtensionModule 'ugit' -ExtensionModuleAlias 'git' -ExtensionNoun 'UGitExtension' -ExtensionTypeName 'ugit.extension' -OutputPath '.\Get-UGitExtension.ps1' @@ -614,6 +614,8 @@ function Get-UGitExtension $ExtensionDynamicParameters = [Management.Automation.RuntimeDefinedParameterDictionary]::new() $Extension = $this + $ExtensionMetadata = $Extension -as [Management.Automation.CommandMetaData] + if (-not $ExtensionMetadata) { return $ExtensionDynamicParameters } :nextDynamicParameter foreach ($in in @(($Extension -as [Management.Automation.CommandMetaData]).Parameters.Keys)) { $attrList = [Collections.Generic.List[Attribute]]::new() @@ -1042,12 +1044,16 @@ function Get-UGitExtension if ($Force) { $script:UGitExtensions = $null + $script:UGitExtensionsByName = $null $script:AllCommands = @() } if (-not $script:UGitExtensions) { - $script:UGitExtensionsFromFiles = [Ordered]@{} - $script:UGitExtensionsFileTimes = [Ordered]@{} + $script:UGitExtensionsFromFiles = [Ordered]@{} + $script:UGitExtensionsFileTimes = [Ordered]@{} + $script:UGitExtensionsByName = [Ordered]@{} + $script:UGitExtensionsByDisplayName = [Ordered]@{} + $script:UGitExtensionsByPattern = [Ordered]@{} $script:UGitExtensions = @(@( #region Find UGitExtension in Loaded Modules @@ -1093,6 +1099,46 @@ function Get-UGitExtension $ExecutionContext.SessionState.InvokeCommand.GetCommands('*', 'Function,Alias',$true) -match $extensionFullRegex #endregion Find UGitExtension in Loaded Commands ) | Select-Object -Unique | Sort-Object Rank, Name) + + foreach ($extCmd in $script:UGitExtensions) { + if (-not $script:UGitExtensionsByName[$extCmd.Name]) { + $script:UGitExtensionsByName[$extCmd.Name] = $extCmd + } + else { + $script:UGitExtensionsByName[$extCmd.Name] = @($script:UGitExtensionsByName[$extCmd.Name]) + $extCmd + } + if ($extCmd.DisplayName) { + if (-not $script:UGitExtensionsByDisplayName[$extCmd.DisplayName]) { + $script:UGitExtensionsByDisplayName[$extCmd.DisplayName] = $extCmd + } + else { + $script:UGitExtensionsByDisplayName[$extCmd.DisplayName] = @($script:UGitExtensionsByDisplayName[$extCmd.DisplayName]) + $extCmd + } + } + $ExtensionCommandAliases = @($extCmd.Attributes.AliasNames) + $ExtensionCommandAliasRegexes = @($ExtensionCommandAliases -match '^/' -match '/$') + $ExtensionCommandNormalAliases = @($ExtensionCommandAliases -notmatch '^/') + if ($ExtensionCommandAliasRegexes) { + foreach ($extensionAliasRegex in $ExtensionCommandAliasRegexes) { + $regex = [Regex]::New($extensionAliasRegex -replace '^/' -replace '/$', 'IgnoreCase,IgnorePatternWhitespace') + if (-not $script:UGitExtensionsByPattern[$regex]) { + $script:UGitExtensionsByPattern[$regex] = $extCmd + } else { + $script:UGitExtensionsByPattern[$regex] = @($script:UGitExtensionsByPattern[$regex]) + $extCmd + } + } + } + if ($ExtensionCommandNormalAliases) { + foreach ($extensionAlias in $ExtensionCommandNormalAliases) { + if (-not $script:UGitExtensionsByName[$extensionAlias]) { + $script:UGitExtensionsByName[$extensionAlias] = $extCmd + } else { + $script:UGitExtensionsByName[$extensionAlias] = @($script:UGitExtensionsByName[$extensionAlias]) + $extCmd + } + } + } + + } } #endregion Find Extensions } @@ -1100,7 +1146,7 @@ function Get-UGitExtension process { if ($UGitExtensionPath) { - @(foreach ($_ in Get-ChildItem -Recurse -Path $UGitExtensionPath -File) { + @(foreach ($_ in Get-ChildItem -Recurse:$($UGitExtensionPath -notmatch '^\.[\\/]') -Path $UGitExtensionPath -File) { if ($_.Name -notmatch $extensionFullRegex) { continue } if ($CommandName -or $UGitExtensionName) { ConvertToExtension $_ | @@ -1118,14 +1164,34 @@ function Get-UGitExtension # This section can be updated by using Install-Piecemeal -ForeachObject #endregion Install-Piecemeal -ForeachObject } elseif ($CommandName -or $UGitExtensionName) { - $script:UGitExtensions | - . WhereExtends $CommandName | - OutputExtension + if (-not $CommandName -and -not $like -and -not $Match) { + foreach ($exn in $UGitExtensionName) { + if ($script:UGitExtensionsByName[$exn]) { + $script:UGitExtensionsByName[$exn] | OutputExtension + } + if ($script:UGitExtensionsByDisplayName[$exn]) { + $script:UGitExtensionsByDisplayName[$exn] | OutputExtension + } + if ($script:UGitExtensionsByPattern.Count) { + foreach ($patternAndValue in $script:UGitExtensionsByPattern.GetEnumerator()) { + if ($patternAndValue.Key.IsMatch($exn)) { + $patternAndValue.Value | OutputExtension + } + } + $script:UGitExtensionsByDisplayName[$exn] + } + } + } else { + $script:UGitExtensions | + . WhereExtends $CommandName | + OutputExtension + } + } else { $script:UGitExtensions | OutputExtension } } } -#endregion Piecemeal [ 0.3.10 ] : Easy Extensible Plugins for PowerShell +#endregion Piecemeal [ 0.4.1 ] : Easy Extensible Plugins for PowerShell From 346184f7662530774791af05e752327584159a3b Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 5 Oct 2023 05:01:37 +0000 Subject: [PATCH 05/55] Supporting git submodule status (Fixes #183) --- ugit.format.ps1xml | 197 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 194 insertions(+), 3 deletions(-) diff --git a/ugit.format.ps1xml b/ugit.format.ps1xml index 79bf4621..042dc14e 100644 --- a/ugit.format.ps1xml +++ b/ugit.format.ps1xml @@ -1,5 +1,5 @@ - + @@ -398,7 +398,7 @@ } elseif ($canUseANSI) { # For ANSI, - '' + $esc + ']8m;;' + $Link + $esc + '\' + '' + $esc + ']8;;' + $Link + $esc + '\' } } @@ -914,6 +914,9 @@ $BackgroundColor Already on + + $_.BranchName -in 'main', 'master' + $moduleName = 'ugit' do { @@ -950,9 +953,15 @@ $BackgroundColor "'$($_.BranchName)'" + + $_.BranchName -in 'main', 'master' + @(& ${ugit_Format-RichText} -ForegroundColor 'warning' ) -join '' + + $_.BranchName -notin 'main', 'master' + @(& ${ugit_Format-RichText} -ForegroundColor 'verbose' -NoClear) -join '' @@ -962,6 +971,9 @@ $BackgroundColor "'$($_.BranchName)'" + + $_.BranchName -notin 'main', 'master' + @(& ${ugit_Format-RichText} -ForegroundColor 'verbose' ) -join '' @@ -987,6 +999,9 @@ $BackgroundColor Switched to + + $_.BranchName -in 'main', 'master' + $moduleName = 'ugit' do { @@ -1023,9 +1038,15 @@ $BackgroundColor "'$($_.BranchName)'" + + $_.BranchName -in 'main', 'master' + @(& ${ugit_Format-RichText} -ForegroundColor 'warning' ) -join '' + + $_.BranchName -notin 'main', 'master' + @(& ${ugit_Format-RichText} -ForegroundColor 'verbose' -NoClear) -join '' @@ -1035,6 +1056,9 @@ $BackgroundColor "'$($_.BranchName)'" + + $_.BranchName -notin 'main', 'master' + @(& ${ugit_Format-RichText} -ForegroundColor 'verbose' ) -join '' @@ -1212,6 +1236,11 @@ $BackgroundColor @(& ${ugit_Format-RichText} -ForegroundColor 'verbose' ) -join '' + + + $_.Insertions + + @(& ${ugit_Format-RichText} -ForegroundColor 'Success' -NoClear) -join '' @@ -1225,9 +1254,19 @@ $BackgroundColor + + + $_.Insertions + + @(& ${ugit_Format-RichText} -ForegroundColor 'Success' ) -join '' + + + $_.Deletions + + @(& ${ugit_Format-RichText} -ForegroundColor 'Error' -NoClear) -join '' @@ -1241,6 +1280,11 @@ $BackgroundColor + + + $_.Deletions + + @(& ${ugit_Format-RichText} -ForegroundColor 'Error' ) -join '' @@ -1324,6 +1368,9 @@ $BackgroundColor @(& ${ugit_Format-RichText} -ForegroundColor 'Verbose' ) -join '' + + $_.Binary + @(& ${ugit_Format-RichText} -ForegroundColor 'Warning' -NoClear) -join '' @@ -1335,6 +1382,9 @@ $BackgroundColor + + $_.Binary + @(& ${ugit_Format-RichText} -ForegroundColor 'Warning' ) -join '' @@ -1400,6 +1450,12 @@ $BackgroundColor @(& ${ugit_Format-RichText} -ForegroundColor 'Cyan' ) -join '' + + + # LineNumber in green (if present) + $_.LineNumber + + @(& ${ugit_Format-RichText} -ForegroundColor 'Green' -NoClear) -join '' @@ -1412,16 +1468,40 @@ $BackgroundColor LineNumber + + + # LineNumber in green (if present) + $_.LineNumber + + @(& ${ugit_Format-RichText} -ForegroundColor 'Green' ) -join '' + + + # Colons in cyan + $_.LineNumber + + @(& ${ugit_Format-RichText} -ForegroundColor 'Cyan' -NoClear) -join '' : + + + # Colons in cyan + $_.LineNumber + + @(& ${ugit_Format-RichText} -ForegroundColor 'Cyan' ) -join '' + + + # ColumnNumber in green (if present) + $_.ColumnNumber + + @(& ${ugit_Format-RichText} -ForegroundColor 'Green' -NoClear) -join '' @@ -1436,13 +1516,31 @@ $BackgroundColor + + + # ColumnNumber in green (if present) + $_.ColumnNumber + + @(& ${ugit_Format-RichText} -ForegroundColor 'Green' ) -join '' + + + # Colons in cyan + $_.ColumnNumber + + @(& ${ugit_Format-RichText} -ForegroundColor 'Cyan' -NoClear) -join '' : + + + # Colons in cyan + $_.ColumnNumber + + @(& ${ugit_Format-RichText} -ForegroundColor 'Cyan' ) -join '' @@ -1655,7 +1753,7 @@ $BackgroundColor - Git.Pull.FastForwardGit.Pull.Strategy + Git.Pull.FastForward Git.Pull.FastForward Git.Pull.Strategy @@ -1673,6 +1771,9 @@ $BackgroundColor + + $_.strategy + $moduleName = 'ugit' do { @@ -1711,6 +1812,9 @@ $BackgroundColor + + $_.strategy + @(& ${ugit_Format-RichText} -ForegroundColor 'Warning' ) -join '' @@ -1769,6 +1873,9 @@ $BackgroundColor + + $_.Changes + @(& ${ugit_Format-RichText} -ForegroundColor 'verbose' -NoClear) -join '' @@ -1780,9 +1887,17 @@ $BackgroundColor + + $_.Changes + @(& ${ugit_Format-RichText} -ForegroundColor 'verbose' ) -join '' + + + $_.Insertions + + @(& ${ugit_Format-RichText} -ForegroundColor 'Success' -NoClear) -join '' @@ -1796,9 +1911,19 @@ $BackgroundColor + + + $_.Insertions + + @(& ${ugit_Format-RichText} -ForegroundColor 'Success' ) -join '' + + + $_.Deletions + + @(& ${ugit_Format-RichText} -ForegroundColor 'Error' -NoClear) -join '' @@ -1812,6 +1937,11 @@ $BackgroundColor + + + $_.Deletions + + @(& ${ugit_Format-RichText} -ForegroundColor 'Error' ) -join '' @@ -2313,6 +2443,9 @@ $BackgroundColor @(& ${ugit_Format-RichText} -ForegroundColor 'Success' ) -join '' + + $_.Email + @(& ${ugit_Format-RichText} -ForegroundColor 'Warning' -NoClear) -join '' @@ -2324,6 +2457,9 @@ $BackgroundColor + + $_.Email + @(& ${ugit_Format-RichText} -ForegroundColor 'Warning' ) -join '' @@ -2438,6 +2574,9 @@ $BackgroundColor On Branch: + + $_.BranchName -notin 'main', 'master' + $moduleName = 'ugit' do { @@ -2474,9 +2613,15 @@ $BackgroundColor $_.BranchName + + $_.BranchName -notin 'main', 'master' + @(& ${ugit_Format-RichText} -ForegroundColor 'Verbose' ) -join '' + + $_.BranchName -in 'main', 'master' + @(& ${ugit_Format-RichText} -ForegroundColor 'Warning' -NoClear) -join '' @@ -2486,6 +2631,9 @@ $BackgroundColor $_.BranchName + + $_.BranchName -in 'main', 'master' + @(& ${ugit_Format-RichText} -ForegroundColor 'Warning' ) -join '' @@ -2671,6 +2819,9 @@ $BackgroundColor On Branch: + + $_.BranchName -notin 'main', 'master' + $moduleName = 'ugit' do { @@ -2707,9 +2858,15 @@ $BackgroundColor $_.BranchName + + $_.BranchName -notin 'main', 'master' + @(& ${ugit_Format-RichText} -ForegroundColor 'Verbose' ) -join '' + + $_.BranchName -in 'main', 'master' + @(& ${ugit_Format-RichText} -ForegroundColor 'Warning' -NoClear) -join '' @@ -2719,6 +2876,9 @@ $BackgroundColor $_.BranchName + + $_.BranchName -in 'main', 'master' + @(& ${ugit_Format-RichText} -ForegroundColor 'Warning' ) -join '' @@ -2791,6 +2951,37 @@ $BackgroundColor + + git.submodule.status + + git.submodule.status + + + + + + + + + + + + + + + Submodule + + + Reference + + + CommitHash + + + + + + ugit.extension From 16e622b1054fbf9ea973add328e22f7acb1c57d0 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 5 Oct 2023 05:01:37 +0000 Subject: [PATCH 06/55] Supporting git submodule status (Fixes #183) --- ugit.types.ps1xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ugit.types.ps1xml b/ugit.types.ps1xml index 21eaa36b..4187e8c7 100644 --- a/ugit.types.ps1xml +++ b/ugit.types.ps1xml @@ -1,5 +1,5 @@ - + git.branch From f0c0d1e86a86e97d499d68ccfe553ef58a095869 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 5 Oct 2023 05:01:41 +0000 Subject: [PATCH 07/55] Supporting git submodule status (Fixes #183) --- docs/Get-UGitExtension.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Get-UGitExtension.md b/docs/Get-UGitExtension.md index 8779c7a4..d79774a4 100644 --- a/docs/Get-UGitExtension.md +++ b/docs/Get-UGitExtension.md @@ -28,13 +28,13 @@ UGitExtension can be found in: ### Examples -#### EXAMPLE 1 +> EXAMPLE 1 + ```PowerShell Get-UGitExtension ``` - --- From 8da483ab385e08341650c6d648799799bff41ca6 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 5 Oct 2023 05:01:41 +0000 Subject: [PATCH 08/55] Supporting git submodule status (Fixes #183) --- docs/Out-Git.md | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/docs/Out-Git.md b/docs/Out-Git.md index 603007cc..2e3aabd1 100644 --- a/docs/Out-Git.md +++ b/docs/Out-Git.md @@ -41,32 +41,28 @@ Extensions use two attributes to indicate if they should be run: ### Examples -#### EXAMPLE 1 +Log entries are returned as objects, with properties and methods. + ```PowerShell -# Log entries are returned as objects, with properties and methods. git log -n 1 | Get-Member ``` +Status entries are converted into objects. -#### EXAMPLE 2 ```PowerShell -# Status entries are converted into objects. git status ``` +Display untracked files. -#### EXAMPLE 3 ```PowerShell -# Display untracked files. git status | Select-Object -ExpandProperty Untracked ``` +Display the list of branches, as objects. -#### EXAMPLE 4 ```PowerShell -# Display the list of branches, as objects. git branch ``` - --- From 53b11343ef9346b90099bc1940882d6949619f5a Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 5 Oct 2023 05:01:42 +0000 Subject: [PATCH 09/55] Supporting git submodule status (Fixes #183) --- docs/Use-Git.md | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/docs/Use-Git.md b/docs/Use-Git.md index 85528511..c418d19d 100644 --- a/docs/Use-Git.md +++ b/docs/Use-Git.md @@ -41,32 +41,28 @@ Use-Git will combine errors and output, so that git output to standard error is ### Examples -#### EXAMPLE 1 +Log entries are returned as objects, with properties and methods. + ```PowerShell -# Log entries are returned as objects, with properties and methods. git log -n 1 | Get-Member ``` +Status entries are converted into objects. -#### EXAMPLE 2 ```PowerShell -# Status entries are converted into objects. git status ``` +Display untracked files. -#### EXAMPLE 3 ```PowerShell -# Display untracked files. git status | Select-Object -ExpandProperty Untracked ``` +Display the list of branches, as objects. -#### EXAMPLE 4 ```PowerShell -# Display the list of branches, as objects. git branch ``` - --- From 632d6f7c09d5f020c4a7daf2f9017c6ee028c08f Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 5 Oct 2023 05:01:42 +0000 Subject: [PATCH 10/55] Supporting git submodule status (Fixes #183) --- docs/git.md | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/docs/git.md b/docs/git.md index 85528511..c418d19d 100644 --- a/docs/git.md +++ b/docs/git.md @@ -41,32 +41,28 @@ Use-Git will combine errors and output, so that git output to standard error is ### Examples -#### EXAMPLE 1 +Log entries are returned as objects, with properties and methods. + ```PowerShell -# Log entries are returned as objects, with properties and methods. git log -n 1 | Get-Member ``` +Status entries are converted into objects. -#### EXAMPLE 2 ```PowerShell -# Status entries are converted into objects. git status ``` +Display untracked files. -#### EXAMPLE 3 ```PowerShell -# Display untracked files. git status | Select-Object -ExpandProperty Untracked ``` +Display the list of branches, as objects. -#### EXAMPLE 4 ```PowerShell -# Display the list of branches, as objects. git branch ``` - --- From 0ae910f2350982f92d6e343c2cca28e9f73f87e1 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 5 Oct 2023 05:01:42 +0000 Subject: [PATCH 11/55] Supporting git submodule status (Fixes #183) --- docs/gitreal.md | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/docs/gitreal.md b/docs/gitreal.md index 85528511..c418d19d 100644 --- a/docs/gitreal.md +++ b/docs/gitreal.md @@ -41,32 +41,28 @@ Use-Git will combine errors and output, so that git output to standard error is ### Examples -#### EXAMPLE 1 +Log entries are returned as objects, with properties and methods. + ```PowerShell -# Log entries are returned as objects, with properties and methods. git log -n 1 | Get-Member ``` +Status entries are converted into objects. -#### EXAMPLE 2 ```PowerShell -# Status entries are converted into objects. git status ``` +Display untracked files. -#### EXAMPLE 3 ```PowerShell -# Display untracked files. git status | Select-Object -ExpandProperty Untracked ``` +Display the list of branches, as objects. -#### EXAMPLE 4 ```PowerShell -# Display the list of branches, as objects. git branch ``` - --- From e71db786c03ffa3122a7b6543213e2f099be41da Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 5 Oct 2023 05:01:42 +0000 Subject: [PATCH 12/55] Supporting git submodule status (Fixes #183) --- docs/realgit.md | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/docs/realgit.md b/docs/realgit.md index 85528511..c418d19d 100644 --- a/docs/realgit.md +++ b/docs/realgit.md @@ -41,32 +41,28 @@ Use-Git will combine errors and output, so that git output to standard error is ### Examples -#### EXAMPLE 1 +Log entries are returned as objects, with properties and methods. + ```PowerShell -# Log entries are returned as objects, with properties and methods. git log -n 1 | Get-Member ``` +Status entries are converted into objects. -#### EXAMPLE 2 ```PowerShell -# Status entries are converted into objects. git status ``` +Display untracked files. -#### EXAMPLE 3 ```PowerShell -# Display untracked files. git status | Select-Object -ExpandProperty Untracked ``` +Display the list of branches, as objects. -#### EXAMPLE 4 ```PowerShell -# Display the list of branches, as objects. git branch ``` - --- From 49b00076a1dc99d7b33520d1996c99d49ca8c01a Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 5 Oct 2023 05:01:45 +0000 Subject: [PATCH 13/55] Supporting git submodule status (Fixes #183) --- docs/Git.Branch-Extension.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/Git.Branch-Extension.md b/docs/Git.Branch-Extension.md index 36c13a85..96bde0bd 100644 --- a/docs/Git.Branch-Extension.md +++ b/docs/Git.Branch-Extension.md @@ -22,12 +22,13 @@ Outputs git branch as objects (unless, -m, -c, -column, -format, or -show-curren ### Examples -#### EXAMPLE 1 +> EXAMPLE 1 + ```PowerShell git branch # Get a list of branches ``` +> EXAMPLE 2 -#### EXAMPLE 2 ```PowerShell git branch | # Get all branches Where-Object -Not IsCurrentBranch | # where it is not the current branch @@ -36,7 +37,6 @@ git branch | # Get all branches ``` - --- From f795d173cb435eeb4c0a14e6e176d2c5d4a35756 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 5 Oct 2023 05:01:45 +0000 Subject: [PATCH 14/55] Supporting git submodule status (Fixes #183) --- docs/Git.Checkout-Extension.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/Git.Checkout-Extension.md b/docs/Git.Checkout-Extension.md index 3011c8eb..fa9a265b 100644 --- a/docs/Git.Checkout-Extension.md +++ b/docs/Git.Checkout-Extension.md @@ -22,18 +22,18 @@ Outputs git checkout as objects. ### Examples -#### EXAMPLE 1 +> EXAMPLE 1 + ```PowerShell git checkout -b CreateNewBranch ``` +> EXAMPLE 2 -#### EXAMPLE 2 ```PowerShell git checkout main ``` - --- From 2702fbc3ac757b4fc8836a69ea26b363ed2fd3b7 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 5 Oct 2023 05:01:45 +0000 Subject: [PATCH 15/55] Supporting git submodule status (Fixes #183) --- docs/Git.Clone.Input-Extension.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Git.Clone.Input-Extension.md b/docs/Git.Clone.Input-Extension.md index 5882a77e..434efb60 100644 --- a/docs/Git.Clone.Input-Extension.md +++ b/docs/Git.Clone.Input-Extension.md @@ -24,13 +24,13 @@ By default, if --progress is not found, it will be added to any git clone. ### Examples -#### EXAMPLE 1 +> EXAMPLE 1 + ```PowerShell git clone https://github.com/MDN/content.git # This is a big repo. Progress bars will be very welcome. ``` - --- From 70d4be4be0807f7ea14bd4b9aa4eea74c5f3ab9d Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 5 Oct 2023 05:01:45 +0000 Subject: [PATCH 16/55] Supporting git submodule status (Fixes #183) --- docs/Git.Clone-Extension.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/Git.Clone-Extension.md b/docs/Git.Clone-Extension.md index dfd5106c..cebb446d 100644 --- a/docs/Git.Clone-Extension.md +++ b/docs/Git.Clone-Extension.md @@ -22,20 +22,19 @@ Clones a repository, and returns the result as an object. ### Examples -#### EXAMPLE 1 +> EXAMPLE 1 + ```PowerShell git clone https://github.com/StartAutomating/ugit.git ``` +Clone a large repo. +When --progress is provided, Write-Progress will be called. -#### EXAMPLE 2 ```PowerShell -# Clone a large repo. -# When --progress is provided, Write-Progress will be called. git clone https://github.com/Azure/azure-quickstart-templates --progress ``` - --- From 2810a72fbbb8b67693e24bcc430f138b2477adf4 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 5 Oct 2023 05:01:45 +0000 Subject: [PATCH 17/55] Supporting git submodule status (Fixes #183) --- docs/Git.Commit.Input-Extension.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/docs/Git.Commit.Input-Extension.md b/docs/Git.Commit.Input-Extension.md index 89728882..1fd8d958 100644 --- a/docs/Git.Commit.Input-Extension.md +++ b/docs/Git.Commit.Input-Extension.md @@ -22,16 +22,14 @@ Makes Git Commit easier to use from PowerShell by providing parameters for the - ### Examples -#### EXAMPLE 1 +> EXAMPLE 1 + ```PowerShell git commit -Title "Fixing Something" ``` +> EXAMPLE 2 -#### EXAMPLE 2 -```PowerShell "} -``` - --- From a15c04578dbf84646bbc2977ca435f57f6dc4120 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 5 Oct 2023 05:01:45 +0000 Subject: [PATCH 18/55] Supporting git submodule status (Fixes #183) --- docs/Git.Commit-Extension.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/Git.Commit-Extension.md b/docs/Git.Commit-Extension.md index 572395ee..655a3597 100644 --- a/docs/Git.Commit-Extension.md +++ b/docs/Git.Commit-Extension.md @@ -22,19 +22,19 @@ Returns output from succesful git commits as objects. ### Examples -#### EXAMPLE 1 +> EXAMPLE 1 + ```PowerShell git commit -m "Updating #123" ``` +> EXAMPLE 2 -#### EXAMPLE 2 ```PowerShell $committedMessage = git commit -m "Committting Stuff" # Whoops, this commit had a typo $commitMessage.Amend("Committing stuff") # that's better ``` - --- From b7394ef12d922ec06233d789b674785e9db4020f Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 5 Oct 2023 05:01:45 +0000 Subject: [PATCH 19/55] Supporting git submodule status (Fixes #183) --- docs/Git.FileName-Extension.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Git.FileName-Extension.md b/docs/Git.FileName-Extension.md index 800280a9..d810e52b 100644 --- a/docs/Git.FileName-Extension.md +++ b/docs/Git.FileName-Extension.md @@ -26,13 +26,13 @@ If that fails, it will output a Git.Object.Name. ### Examples -#### EXAMPLE 1 +> EXAMPLE 1 + ```PowerShell git diff --name-only ``` - --- From a19a8d4109292b733d2ebf47cb7732a7fc5b2b71 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 5 Oct 2023 05:01:45 +0000 Subject: [PATCH 20/55] Supporting git submodule status (Fixes #183) --- docs/Git.FileOutput-Extension.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Git.FileOutput-Extension.md b/docs/Git.FileOutput-Extension.md index 62f13224..bec26521 100644 --- a/docs/Git.FileOutput-Extension.md +++ b/docs/Git.FileOutput-Extension.md @@ -24,13 +24,13 @@ When the command is finished, this will attempt to file the argument provided af ### Examples -#### EXAMPLE 1 +> EXAMPLE 1 + ```PowerShell git archive -o My.zip ``` - --- From e543ea4e568d265c7f2ec8f12b77b840b8cdaccc Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 5 Oct 2023 05:01:45 +0000 Subject: [PATCH 21/55] Supporting git submodule status (Fixes #183) --- docs/Git.Grep-Extension.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Git.Grep-Extension.md b/docs/Git.Grep-Extension.md index 4c657919..61baa477 100644 --- a/docs/Git.Grep-Extension.md +++ b/docs/Git.Grep-Extension.md @@ -34,13 +34,13 @@ When possible, the regular expression will be converted into PowerSEhll so that ### Examples -#### EXAMPLE 1 +> EXAMPLE 1 + ```PowerShell git grep '-i' example # look for all examples in the repository ``` - --- From c48b298a0766648606c89f74d214381a054fc111 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 5 Oct 2023 05:01:45 +0000 Subject: [PATCH 22/55] Supporting git submodule status (Fixes #183) --- docs/Git.Help.All-Extension.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/Git.Help.All-Extension.md b/docs/Git.Help.All-Extension.md index 395c8678..1a71f0e9 100644 --- a/docs/Git.Help.All-Extension.md +++ b/docs/Git.Help.All-Extension.md @@ -22,18 +22,18 @@ Returns git help --all as objects. ### Examples -#### EXAMPLE 1 +> EXAMPLE 1 + ```PowerShell git help -a ``` +> EXAMPLE 2 -#### EXAMPLE 2 ```PowerShell git help --all ``` - --- From 0c3c155462792dbfc65aa7634f5490fde0620456 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 5 Oct 2023 05:01:45 +0000 Subject: [PATCH 23/55] Supporting git submodule status (Fixes #183) --- docs/Git.Init-Extension.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Git.Init-Extension.md b/docs/Git.Init-Extension.md index 78053d2e..f196d431 100644 --- a/docs/Git.Init-Extension.md +++ b/docs/Git.Init-Extension.md @@ -22,13 +22,13 @@ Outputs git init as objects (unless, -q or --quiet are passed) ### Examples -#### EXAMPLE 1 +> EXAMPLE 1 + ```PowerShell git init # Initialize the current directory as a repository ``` - --- From 563ea39a4c3a55247e59af058df0e20f1b648be0 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 5 Oct 2023 05:01:45 +0000 Subject: [PATCH 24/55] Supporting git submodule status (Fixes #183) --- docs/Git.Log.Input-Extension.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Git.Log.Input-Extension.md b/docs/Git.Log.Input-Extension.md index 8374f2d5..5ffc57c0 100644 --- a/docs/Git.Log.Input-Extension.md +++ b/docs/Git.Log.Input-Extension.md @@ -31,13 +31,13 @@ Also adds -IssueNumber, which searchers for commits that reference particular is ### Examples -#### EXAMPLE 1 +> EXAMPLE 1 + ```PowerShell git log -CurrentBranch ``` - --- From 3e822996f20a33f76abd5564160fb85f6bb8fbdd Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 5 Oct 2023 05:01:45 +0000 Subject: [PATCH 25/55] Supporting git submodule status (Fixes #183) --- docs/Git.Log-Extension.md | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/docs/Git.Log-Extension.md b/docs/Git.Log-Extension.md index 40f0e053..69598586 100644 --- a/docs/Git.Log-Extension.md +++ b/docs/Git.Log-Extension.md @@ -22,57 +22,52 @@ Outputs git log as objects. ### Examples -#### EXAMPLE 1 +Get all logs + ```PowerShell -# Get all logs git log | # until the first merged pull request Where-Object -Not Merged ``` +Get a single log entry -#### EXAMPLE 2 ```PowerShell -# Get a single log entry git log -n 1 | # and see what the log object can do. Get-Member ``` +Get all logs -#### EXAMPLE 3 ```PowerShell -# Get all logs git log | # Group them by the author Group-Object GitUserEmail -NoElement | # sort them by count Sort-Object Count -Descending ``` +Get all logs -#### EXAMPLE 4 ```PowerShell -# Get all logs git log | # Group them by day of week Group-Object { $_.CommitDate.DayOfWeek } -NoElement ``` +Get all logs -#### EXAMPLE 5 ```PowerShell -# Get all logs git log | # where there is a pull request number Where-Object PullRequestNumber | # pick out the PullRequestNumber and CommitDate Select PullRequestNumber, CommitDate ``` +> EXAMPLE 6 -#### EXAMPLE 6 ```PowerShell git log --merges ``` - --- From 2fe023b1de7ff2b24e7a23900ded112303f762ba Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 5 Oct 2023 05:01:46 +0000 Subject: [PATCH 26/55] Supporting git submodule status (Fixes #183) --- docs/Git.Mv-Extension.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/Git.Mv-Extension.md b/docs/Git.Mv-Extension.md index cf54fa05..e980331c 100644 --- a/docs/Git.Mv-Extension.md +++ b/docs/Git.Mv-Extension.md @@ -22,18 +22,18 @@ Outputs git mv as objects. ### Examples -#### EXAMPLE 1 +> EXAMPLE 1 + ```PowerShell git mv .\OldName.txt .\NewName.txt ``` +> EXAMPLE 2 -#### EXAMPLE 2 ```PowerShell git mv .\OldName.txt .\NewName.txt --verbose ``` - --- From dc3017906e0a6c0d3011a15130580d5a489c4f62 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 5 Oct 2023 05:01:46 +0000 Subject: [PATCH 27/55] Supporting git submodule status (Fixes #183) --- docs/Git.Pull-Extension.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Git.Pull-Extension.md b/docs/Git.Pull-Extension.md index 76494216..b09a2253 100644 --- a/docs/Git.Pull-Extension.md +++ b/docs/Git.Pull-Extension.md @@ -22,13 +22,13 @@ Returns git pull as objects. ### Examples -#### EXAMPLE 1 +> EXAMPLE 1 + ```PowerShell git pull ``` - --- From 5cc3088ce74957515b3c45aefa5361b9c18098ab Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 5 Oct 2023 05:01:46 +0000 Subject: [PATCH 28/55] Supporting git submodule status (Fixes #183) --- docs/Git.Push-Extension.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Git.Push-Extension.md b/docs/Git.Push-Extension.md index 54da95e0..1494dbde 100644 --- a/docs/Git.Push-Extension.md +++ b/docs/Git.Push-Extension.md @@ -22,13 +22,13 @@ Outputs git push as objects. ### Examples -#### EXAMPLE 1 +> EXAMPLE 1 + ```PowerShell git push ``` - --- From 1457bce7565e8e1fa26e024942d8f9b7fd4ca0e0 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 5 Oct 2023 05:01:46 +0000 Subject: [PATCH 29/55] Supporting git submodule status (Fixes #183) --- docs/Git.RefLog-Extension.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Git.RefLog-Extension.md b/docs/Git.RefLog-Extension.md index abbfa2db..2799934e 100644 --- a/docs/Git.RefLog-Extension.md +++ b/docs/Git.RefLog-Extension.md @@ -22,13 +22,13 @@ Outputs git reflog as objects. ### Examples -#### EXAMPLE 1 +> EXAMPLE 1 + ```PowerShell git reflog ``` - --- From c2d7fca1431fdc76f61e7f5860df4f8988eda8bc Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 5 Oct 2023 05:01:46 +0000 Subject: [PATCH 30/55] Supporting git submodule status (Fixes #183) --- docs/Git.Remote-Extension.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/Git.Remote-Extension.md b/docs/Git.Remote-Extension.md index 98319fdd..dd7a5eb6 100644 --- a/docs/Git.Remote-Extension.md +++ b/docs/Git.Remote-Extension.md @@ -22,23 +22,23 @@ Outputs git remotes as objects. ### Examples -#### EXAMPLE 1 +> EXAMPLE 1 + ```PowerShell git remote ``` +> EXAMPLE 2 -#### EXAMPLE 2 ```PowerShell git remote | git remote get-url ``` +> EXAMPLE 3 -#### EXAMPLE 3 ```PowerShell git remote | git remote show ``` - --- From 378c2fe44c39f29816157e9a6b723ab1dd0f8716 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 5 Oct 2023 05:01:46 +0000 Subject: [PATCH 31/55] Supporting git submodule status (Fixes #183) --- docs/Git.Rm-Extension.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Git.Rm-Extension.md b/docs/Git.Rm-Extension.md index 7340dff6..95588659 100644 --- a/docs/Git.Rm-Extension.md +++ b/docs/Git.Rm-Extension.md @@ -22,13 +22,13 @@ Outputs git rm as objects. ### Examples -#### EXAMPLE 1 +> EXAMPLE 1 + ```PowerShell git rm .\FileIDontCareAbout.txt ``` - --- From 0ac451b4fd416ad1a687266d2176c454e2d2ff3a Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 5 Oct 2023 05:01:46 +0000 Subject: [PATCH 32/55] Supporting git submodule status (Fixes #183) --- docs/Git.Shortlog-Extension.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/Git.Shortlog-Extension.md b/docs/Git.Shortlog-Extension.md index 4278dac3..2c7c6cf1 100644 --- a/docs/Git.Shortlog-Extension.md +++ b/docs/Git.Shortlog-Extension.md @@ -22,28 +22,28 @@ Outputs git shortlog as objects ### Examples -#### EXAMPLE 1 +> EXAMPLE 1 + ```PowerShell git shortlog # Get a shortlog ``` +> EXAMPLE 2 -#### EXAMPLE 2 ```PowerShell git shortlog --email # Get a shortlog with email information ``` +> EXAMPLE 3 -#### EXAMPLE 3 ```PowerShell git shortlog --summary # Get a shortlog summary ``` +> EXAMPLE 4 -#### EXAMPLE 4 ```PowerShell git shortlog --sumary --email # Get a shortlog summary, with email. ``` - --- From c7027ec5d7d158382fee6c14e04707d4bc19a261 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 5 Oct 2023 05:01:46 +0000 Subject: [PATCH 33/55] Supporting git submodule status (Fixes #183) --- docs/Git.Stash-Extension.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Git.Stash-Extension.md b/docs/Git.Stash-Extension.md index 55113c9c..d57f5c90 100644 --- a/docs/Git.Stash-Extension.md +++ b/docs/Git.Stash-Extension.md @@ -22,13 +22,13 @@ Manages git code stashes. Returns objects wherever possible. ### Examples -#### EXAMPLE 1 +> EXAMPLE 1 + ```PowerShell git stash list ``` - --- From dc9db81222cd6bd42191f2266e0268fc12af34f1 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 5 Oct 2023 05:01:46 +0000 Subject: [PATCH 34/55] Supporting git submodule status (Fixes #183) --- docs/Git.Status-Extension.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/Git.Status-Extension.md b/docs/Git.Status-Extension.md index 7c95e556..f0c09aa6 100644 --- a/docs/Git.Status-Extension.md +++ b/docs/Git.Status-Extension.md @@ -22,18 +22,18 @@ Returns git status as an object. ### Examples -#### EXAMPLE 1 +> EXAMPLE 1 + ```PowerShell git status ``` +> EXAMPLE 2 -#### EXAMPLE 2 ```PowerShell git status | Select-Object -ExpandProperty Untracked ``` - --- From 3890e230e3ae2739f705bcebc945181e05b67561 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 5 Oct 2023 05:01:46 +0000 Subject: [PATCH 35/55] Supporting git submodule status (Fixes #183) --- docs/Git.SubModule-Extension.md | 38 +++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 docs/Git.SubModule-Extension.md diff --git a/docs/Git.SubModule-Extension.md b/docs/Git.SubModule-Extension.md new file mode 100644 index 00000000..242c31af --- /dev/null +++ b/docs/Git.SubModule-Extension.md @@ -0,0 +1,38 @@ +Extensions/Git.SubModule.UGit.extension.ps1 +------------------------------------------- + + + + +### Synopsis +Git Submodule Extension + + + +--- + + +### Description + +Git Submodule as objects. + + + +--- + + +### Examples +> EXAMPLE 1 + +```PowerShell +git submodule +``` + + +--- + + +### Syntax +```PowerShell +Extensions/Git.SubModule.UGit.extension.ps1 [] +``` From 98712c6e21959187e5054de58c021d6636cd9243 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 5 Oct 2023 05:01:47 +0000 Subject: [PATCH 36/55] Supporting git submodule status (Fixes #183) --- docs/README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/README.md b/docs/README.md index 8cbb2f03..0bb905ec 100644 --- a/docs/README.md +++ b/docs/README.md @@ -378,6 +378,13 @@ You might want to try giving some of these a try. git status | Select-Object -ExpandProperty Untracked ~~~ +### Git.SubModule Example 1 + + +~~~PowerShell + git submodule +~~~ + ## Out-Git Extensions ### Git Commands @@ -441,6 +448,9 @@ Most extensions handle output from a single git command. * [Git Status](Git.Status-Extension.md) + +* [Git SubModule](Git.SubModule-Extension.md) + ### Additional Output Extensions From 9bcfb46e4fc58d4d298386119dc7594bda07d38e Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 5 Oct 2023 05:01:47 +0000 Subject: [PATCH 37/55] Supporting git submodule status (Fixes #183) --- docs/assets/ugit.svg | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/assets/ugit.svg b/docs/assets/ugit.svg index 4a8fdd5d..50bffdb4 100644 --- a/docs/assets/ugit.svg +++ b/docs/assets/ugit.svg @@ -1,4 +1,5 @@ + From b28043b2ece2756f9c1ebfe8e3fc1d24c9cfdec2 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 5 Oct 2023 05:01:47 +0000 Subject: [PATCH 38/55] Supporting git submodule status (Fixes #183) --- docs/System/IO/FileInfo/README.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 docs/System/IO/FileInfo/README.md diff --git a/docs/System/IO/FileInfo/README.md b/docs/System/IO/FileInfo/README.md new file mode 100644 index 00000000..8549e1a7 --- /dev/null +++ b/docs/System/IO/FileInfo/README.md @@ -0,0 +1,7 @@ +## System.IO.FileInfo + + +### Script Methods + + +* [GitChanges](GitChanges.md) From 639496162bf18e421cf6bbda4b7681632969792f Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 5 Oct 2023 05:01:47 +0000 Subject: [PATCH 39/55] Supporting git submodule status (Fixes #183) --- docs/System/IO/FileInfo/GitChanges.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 docs/System/IO/FileInfo/GitChanges.md diff --git a/docs/System/IO/FileInfo/GitChanges.md b/docs/System/IO/FileInfo/GitChanges.md new file mode 100644 index 00000000..c108bbe7 --- /dev/null +++ b/docs/System/IO/FileInfo/GitChanges.md @@ -0,0 +1,21 @@ +System.IO.FileInfo.GitChanges() +------------------------------- + + + + +### Synopsis +Get Changes for a given file + + + +--- + + +### Description + +Gets changes from git for a given file. Can provide a timespan, series of numbers, date, or pair of dates. + + + +--- From 5aaa10c164c390912f94251a6146e04818a39ff2 Mon Sep 17 00:00:00 2001 From: James Brundage <@github.com> Date: Wed, 4 Oct 2023 22:18:36 -0700 Subject: [PATCH 40/55] git submodule status - adding .GitRoot (re #183) --- ...Git.extension.ps1 => Git.SubModule.Status.ugit.extension.ps1} | 1 + 1 file changed, 1 insertion(+) rename Extensions/{Git.SubModule.UGit.extension.ps1 => Git.SubModule.Status.ugit.extension.ps1} (95%) diff --git a/Extensions/Git.SubModule.UGit.extension.ps1 b/Extensions/Git.SubModule.Status.ugit.extension.ps1 similarity index 95% rename from Extensions/Git.SubModule.UGit.extension.ps1 rename to Extensions/Git.SubModule.Status.ugit.extension.ps1 index 8f8a417b..0d0fa7a6 100644 --- a/Extensions/Git.SubModule.UGit.extension.ps1 +++ b/Extensions/Git.SubModule.Status.ugit.extension.ps1 @@ -29,6 +29,7 @@ end { $toObject = [Ordered]@{ PSTypeName = 'git.submodule.status' GitOutputLines = $submoduleLines + GitRoot = $gitRoot } + $Matches [PSCustomObject]$toObject } From 5dcc6681e25d5943731a2b70451f19967df90abc Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 5 Oct 2023 05:19:39 +0000 Subject: [PATCH 41/55] git submodule status - adding .GitRoot (re #183) --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1edb714f..acc7b637 100644 --- a/README.md +++ b/README.md @@ -378,7 +378,7 @@ You might want to try giving some of these a try. git status | Select-Object -ExpandProperty Untracked ~~~ -### Git.SubModule Example 1 +### Git.SubModule.Status Example 1 ~~~PowerShell @@ -449,7 +449,7 @@ Most extensions handle output from a single git command. * [Git Status](docs/Git.Status-Extension.md) -* [Git SubModule](docs/Git.SubModule-Extension.md) +* [Git SubModule Status](docs/Git.SubModule.Status-Extension.md) From 368b7d108e45bf74f0c38abeff644ca1dd13c6e4 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 5 Oct 2023 05:19:56 +0000 Subject: [PATCH 42/55] git submodule status - adding .GitRoot (re #183) --- docs/Git.SubModule.Status-Extension.md | 38 ++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 docs/Git.SubModule.Status-Extension.md diff --git a/docs/Git.SubModule.Status-Extension.md b/docs/Git.SubModule.Status-Extension.md new file mode 100644 index 00000000..466dab97 --- /dev/null +++ b/docs/Git.SubModule.Status-Extension.md @@ -0,0 +1,38 @@ +Extensions/Git.SubModule.Status.ugit.extension.ps1 +-------------------------------------------------- + + + + +### Synopsis +Git Submodule Extension + + + +--- + + +### Description + +Git Submodule as objects. + + + +--- + + +### Examples +> EXAMPLE 1 + +```PowerShell +git submodule +``` + + +--- + + +### Syntax +```PowerShell +Extensions/Git.SubModule.Status.ugit.extension.ps1 [] +``` From 9db6eb0b251b72e04ee56fd7a543fa04492f80dd Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 5 Oct 2023 05:19:57 +0000 Subject: [PATCH 43/55] git submodule status - adding .GitRoot (re #183) --- docs/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/README.md b/docs/README.md index 0bb905ec..9e1fa661 100644 --- a/docs/README.md +++ b/docs/README.md @@ -378,7 +378,7 @@ You might want to try giving some of these a try. git status | Select-Object -ExpandProperty Untracked ~~~ -### Git.SubModule Example 1 +### Git.SubModule.Status Example 1 ~~~PowerShell @@ -449,7 +449,7 @@ Most extensions handle output from a single git command. * [Git Status](Git.Status-Extension.md) -* [Git SubModule](Git.SubModule-Extension.md) +* [Git SubModule Status](Git.SubModule.Status-Extension.md) From 6bc5c92c0fe1949f11bb5bed519903cc3061a907 Mon Sep 17 00:00:00 2001 From: James Brundage <@github.com> Date: Wed, 4 Oct 2023 22:22:21 -0700 Subject: [PATCH 44/55] git log -CurrentBranch - Forking Fixes #179 --- Extensions/Git.Log.Input.UGit.Extension.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Extensions/Git.Log.Input.UGit.Extension.ps1 b/Extensions/Git.Log.Input.UGit.Extension.ps1 index 710d8e69..cbf60154 100644 --- a/Extensions/Git.Log.Input.UGit.Extension.ps1 +++ b/Extensions/Git.Log.Input.UGit.Extension.ps1 @@ -84,7 +84,7 @@ foreach ($dashToDoubleDash in 'after', 'before', 'author') { } if ($CurrentBranch) { - $headbranch = git remote | git remote show | Select-Object -ExpandProperty HeadBranch + $headbranch = git remote | git remote show | Select-Object -ExpandProperty HeadBranch -First 1 $currentBranchName = git branch | Where-Object IsCurrentBranch if ($currentBranchName -ne $headbranch) { "$headbranch..$currentBranchName" From 1353945469430d6b1d38c00ea7cdca0360fc3488 Mon Sep 17 00:00:00 2001 From: James Brundage <@github.com> Date: Wed, 4 Oct 2023 23:20:12 -0700 Subject: [PATCH 45/55] ugit PSA integration (Fixes #186) --- .github/workflows/TestAndPublish.yml | 7 ++++++- GitHub/Jobs/SendPSA.psd1 | 5 +++++ GitHub/Jobs/buildugit.psd1 | 18 ++++++++++++++++-- ugit.GitHubWorkflow.PSDevOps.ps1 | 10 +++++++++- 4 files changed, 36 insertions(+), 4 deletions(-) create mode 100644 GitHub/Jobs/SendPSA.psd1 diff --git a/.github/workflows/TestAndPublish.yml b/.github/workflows/TestAndPublish.yml index 28a89d0c..47239d1a 100644 --- a/.github/workflows/TestAndPublish.yml +++ b/.github/workflows/TestAndPublish.yml @@ -591,4 +591,9 @@ jobs: - name: Run HelpOut uses: StartAutomating/HelpOut@master id: HelpOut - + - name: PSA + uses: StartAutomating/PSA@main + id: PSA +env: + AT_PROTOCOL_HANDLE: mrpowershell.bsky.social + AT_PROTOCOL_APP_PASSWORD: ${{ secrets.AT_PROTOCOL_APP_PASSWORD }} diff --git a/GitHub/Jobs/SendPSA.psd1 b/GitHub/Jobs/SendPSA.psd1 new file mode 100644 index 00000000..e683f3f8 --- /dev/null +++ b/GitHub/Jobs/SendPSA.psd1 @@ -0,0 +1,5 @@ +@{ + name = 'PSA' + uses = 'StartAutomating/PSA@main' + id = 'PSA' +} \ No newline at end of file diff --git a/GitHub/Jobs/buildugit.psd1 b/GitHub/Jobs/buildugit.psd1 index 8269c892..4c7cc8bf 100644 --- a/GitHub/Jobs/buildugit.psd1 +++ b/GitHub/Jobs/buildugit.psd1 @@ -6,6 +6,11 @@ name = 'Check out repository' uses = 'actions/checkout@v2' }, + @{ + name = 'GitLogger' + uses = 'GitLogging/GitLoggerAction@main' + id = 'GitLogger' + }, @{ name = 'Use PSSVG Action' uses = 'StartAutomating/PSSVG@main' @@ -13,7 +18,16 @@ }, 'RunPipeScript', 'RunPiecemeal', - 'RunEZOut', - 'RunHelpOut' + 'RunEZOut', + @{ + name = 'Run HelpOut' + uses = 'StartAutomating/HelpOut@master' + id = 'HelpOut' + }, + @{ + name = 'PSA' + uses = 'StartAutomating/PSA@main' + id = 'PSA' + } ) } \ No newline at end of file diff --git a/ugit.GitHubWorkflow.PSDevOps.ps1 b/ugit.GitHubWorkflow.PSDevOps.ps1 index acf820a6..7f27d661 100644 --- a/ugit.GitHubWorkflow.PSDevOps.ps1 +++ b/ugit.GitHubWorkflow.PSDevOps.ps1 @@ -4,9 +4,17 @@ Import-BuildStep -ModuleName ugit New-GitHubWorkflow -Name "Analyze, Test, Tag, and Publish" -On Push, PullRequest, Demand -Job PowerShellStaticAnalysis, TestPowerShellOnLinux, TagReleaseAndPublish, - buildugit -OutputPath .\.github\workflows\TestAndPublish.yml + buildugit -OutputPath .\.github\workflows\TestAndPublish.yml -Env @{ + "AT_PROTOCOL_HANDLE" = "mrpowershell.bsky.social" + "AT_PROTOCOL_APP_PASSWORD" = '${{ secrets.AT_PROTOCOL_APP_PASSWORD }}' + } New-GitHubWorkflow -On Issue, Demand -Job RunGitPub -Name OnIssueChanged -OutputPath .\.github\workflows\OnIssue.yml +New-GitHubWorkflow -On Demand -Name ugit-psa -Job SendPSA -OutputPath .\.github\workflows\SendPSA.yml -Env @{ + "AT_PROTOCOL_HANDLE" = "mrpowershell.bsky.social" + "AT_PROTOCOL_APP_PASSWORD" = '${{ secrets.AT_PROTOCOL_APP_PASSWORD }}' +} + Pop-Location \ No newline at end of file From 64ea45ba7e280f281d11be0e5f7cd6ad8c31dfe8 Mon Sep 17 00:00:00 2001 From: James Brundage <@github.com> Date: Wed, 4 Oct 2023 23:22:28 -0700 Subject: [PATCH 46/55] ugit PSA integration (Fixes #186) Adding On Demand Action and PSA file --- .github/workflows/SendPSA.yml | 12 +++++++ ugit.psa.ps1 | 62 +++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 .github/workflows/SendPSA.yml create mode 100644 ugit.psa.ps1 diff --git a/.github/workflows/SendPSA.yml b/.github/workflows/SendPSA.yml new file mode 100644 index 00000000..54aed91d --- /dev/null +++ b/.github/workflows/SendPSA.yml @@ -0,0 +1,12 @@ + +name: ugit-psa +on: + workflow_dispatch: +jobs: + SendPSA: + name: PSA + uses: StartAutomating/PSA@main + id: PSA +env: + AT_PROTOCOL_HANDLE: mrpowershell.bsky.social + AT_PROTOCOL_APP_PASSWORD: ${{ secrets.AT_PROTOCOL_APP_PASSWORD }} diff --git a/ugit.psa.ps1 b/ugit.psa.ps1 new file mode 100644 index 00000000..fefeccc3 --- /dev/null +++ b/ugit.psa.ps1 @@ -0,0 +1,62 @@ +# Any *.PSA.ps1 file will be run when PSA runs. + +# A good thing to do at the start of this file is to connect. + +Connect-BlueSky + +# If $env:AT_PROTOCOL_HANDLE or $env:AT_PROTOCOL_EMAIL is set, it will be treated as the username +# If $env:AT_PROTOCOL_APP_PASSWORD is set, it will be treated as the App Password. +# _Never_ use your actual BlueSky password + +# Once we're connected, we can do anything our app password allows. + +# However, you _might_ want to output some information first, so that you can see you're connected. + +Get-BskyActorProfile -Actor $env:AT_PROTOCOL_HANDLE -Cache | Out-Host + +# To ensure you're not going to send a skeet on every checkin, it's a good idea to ask what GitHub is up to + +# There will be a variable, $GitHubEvent, that contains information about the event. + +# A fairly common scenario is to perform an annoucement whenever a PR is merged. + +$isMergeToMain = + ($gitHubEvent.head_commit.message -match "Merge Pull Request #(?\d+)") -and + $gitHubEvent.ref -in 'refs/heads/main', 'refs/heads/master' + + +$importedModule = Import-Module .\ugit.psd1 -Global -PassThru +$importedModule | Out-Host +$moduleAndVersion = "$($importedModule.Name) $($importedModule.Version)" + +$isManuallyTriggered = $gitHubEvent.psobject.properties["input"] + +if ($isMergeToMain -or $isManuallyTriggered) { + + $fullMessage = + @(switch ($importedModule.Version) { + default { + "I've got to admit it's gitting better, gitting better all the time:", + "Somehow, someway, I keep coming up with funky git nearly every single day:", + "#git in the #PowerShell object pipeline!", + "Get your git together!", + "Put this git in your pipe and smoke it!", + "I promise you, git gets better", + "Git ahead of the game!" | + Get-Random + + "$moduleAndVersion" + + "https://github.com/StartAutomating/ugit" + } + }) -join ([Environment]::NewLine * 2) + + + Send-AtProto -Text $fullMessage -WebCard @{ + Url = "https://github.com/StartAutomating/ugit" + } -LinkPattern @{ + "ugit" = "https://github.com/StartAutomating/ugit" + } + + return +} \ No newline at end of file From 2af6a916f3b541c85d18f7e65b1802aaa74d9215 Mon Sep 17 00:00:00 2001 From: James Brundage <@github.com> Date: Wed, 4 Oct 2023 23:26:40 -0700 Subject: [PATCH 47/55] ugit PSA integration (Fixes #186) Fixing On Demand action --- .github/workflows/SendPSA.yml | 11 ++++++++--- GitHub/Jobs/SendPSA.psd1 | 16 +++++++++++++--- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/.github/workflows/SendPSA.yml b/.github/workflows/SendPSA.yml index 54aed91d..579b7f90 100644 --- a/.github/workflows/SendPSA.yml +++ b/.github/workflows/SendPSA.yml @@ -4,9 +4,14 @@ on: workflow_dispatch: jobs: SendPSA: - name: PSA - uses: StartAutomating/PSA@main - id: PSA + runs-on: ubuntu-latest + if: ${{ success() }} + steps: + - name: Check out repository + uses: actions/checkout@v2 + - name: PSA + uses: StartAutomating/PSA@main + id: PSA env: AT_PROTOCOL_HANDLE: mrpowershell.bsky.social AT_PROTOCOL_APP_PASSWORD: ${{ secrets.AT_PROTOCOL_APP_PASSWORD }} diff --git a/GitHub/Jobs/SendPSA.psd1 b/GitHub/Jobs/SendPSA.psd1 index e683f3f8..7fa31f6b 100644 --- a/GitHub/Jobs/SendPSA.psd1 +++ b/GitHub/Jobs/SendPSA.psd1 @@ -1,5 +1,15 @@ @{ - name = 'PSA' - uses = 'StartAutomating/PSA@main' - id = 'PSA' + "runs-on" = "ubuntu-latest" + if = '${{ success() }}' + steps = @( + @{ + name = 'Check out repository' + uses = 'actions/checkout@v2' + }, + @{ + name = 'PSA' + uses = 'StartAutomating/PSA@main' + id = 'PSA' + } + ) } \ No newline at end of file From 34fa85aef1bcfc6c335a0d366eceffe7f7ccdb05 Mon Sep 17 00:00:00 2001 From: James Brundage <@github.com> Date: Wed, 4 Oct 2023 23:37:03 -0700 Subject: [PATCH 48/55] Adding git.branch.diff (Fixes #187) --- Types/git.branch/Alias.psd1 | 1 + Types/git.branch/Diff.ps1 | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 Types/git.branch/Diff.ps1 diff --git a/Types/git.branch/Alias.psd1 b/Types/git.branch/Alias.psd1 index 77ef45d1..91ceb910 100644 --- a/Types/git.branch/Alias.psd1 +++ b/Types/git.branch/Alias.psd1 @@ -1,3 +1,4 @@ @{ HasUpstream = 'IsTracked' + Compare = 'Diff' } \ No newline at end of file diff --git a/Types/git.branch/Diff.ps1 b/Types/git.branch/Diff.ps1 new file mode 100644 index 00000000..62fe3e79 --- /dev/null +++ b/Types/git.branch/Diff.ps1 @@ -0,0 +1,15 @@ +param() + +$firstArg, $restOfArgs = +if (-not $args) { + git remote | git remote show | Select-Object -ExpandProperty HeadBranch -First 1 +} else { + $args | Select-Object -First 1 + $args | Select-Object -Skip 1 +} + +$restOfArgs = @($restOfArgs) + +Push-Location $this.GitRoot +git diff "$($firstArg)..$($this.BranchName)" @restOfArgs +Pop-Location \ No newline at end of file From 246992262da3db10d57be0e008067c721c8b0575 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 5 Oct 2023 06:38:06 +0000 Subject: [PATCH 49/55] Adding git.branch.diff (Fixes #187) --- ugit.types.ps1xml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/ugit.types.ps1xml b/ugit.types.ps1xml index 4187e8c7..441433ec 100644 --- a/ugit.types.ps1xml +++ b/ugit.types.ps1xml @@ -4,6 +4,10 @@ git.branch + + Compare + Diff + HasUpstream IsTracked @@ -13,6 +17,26 @@ + + + Diff + From a363546c8f8a72b48213dcfb62fd7a80854d3436 Mon Sep 17 00:00:00 2001 From: James Brundage <@github.com> Date: Wed, 4 Oct 2023 23:38:53 -0700 Subject: [PATCH 50/55] Adding git.branch.rename (Fixes #86) --- Types/git.branch/Rename.ps1 | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 Types/git.branch/Rename.ps1 diff --git a/Types/git.branch/Rename.ps1 b/Types/git.branch/Rename.ps1 new file mode 100644 index 00000000..f1f5f1bb --- /dev/null +++ b/Types/git.branch/Rename.ps1 @@ -0,0 +1,6 @@ +if (-not $args) { + throw "Must provide a new branch name" +} +Push-Location $this.GitRoot +git branch '-m' $this.BranchName @args +Pop-Location From 5fa4f0d8c50209cada6f40f38e588fd8e6686a82 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 5 Oct 2023 06:40:03 +0000 Subject: [PATCH 51/55] Adding git.branch.rename (Fixes #86) --- ugit.types.ps1xml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ugit.types.ps1xml b/ugit.types.ps1xml index 441433ec..8dd843b3 100644 --- a/ugit.types.ps1xml +++ b/ugit.types.ps1xml @@ -40,6 +40,18 @@ git diff "$($firstArg)..$($this.BranchName)" @restOfArgs Pop-Location + + Rename + + ToString
Time
DateTime
Timestamp| + + + --- @@ -120,5 +135,5 @@ If set, will amend an existing commit. ### Syntax ```PowerShell -Extensions/Git.Commit.Input.UGit.Extension.ps1 [-Message ] [-Title ] [-Body ] [-Trailers ] [-Amend] [] +Extensions/Git.Commit.Input.UGit.Extension.ps1 [-Message ] [-Title ] [-Body ] [-Trailers ] [-Amend] [-CommitDate ] [] ``` From c202782d566250d308618b62799627e19b873aa1 Mon Sep 17 00:00:00 2001 From: James Brundage <@github.com> Date: Wed, 4 Oct 2023 23:49:36 -0700 Subject: [PATCH 54/55] Updating ugit module version [0.4.1] and CHANGELOG --- CHANGELOG.md | 14 +++ ugit.psd1 | 266 +++------------------------------------------------ 2 files changed, 28 insertions(+), 252 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9405d1ab..06cf0449 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,17 @@ +## 0.4.1: + +* New Git Command Support: + * git submodule status (#183) +* New Git ScriptMethods: + * git.branch.diff (#187) + * git.branch.rename (#86) +* Easier Input: + * git commit -CommitDate (#184) + * git log -CurrentBranch (fixing forks, #179) +* Announcing Releases with [PSA](https://github.com/StartAutomating/PSA) + +--- + ## 0.4: * Adding Sponsorship! (#174) diff --git a/ugit.psd1 b/ugit.psd1 index 2719c820..1b8849ad 100644 --- a/ugit.psd1 +++ b/ugit.psd1 @@ -1,5 +1,5 @@ @{ - ModuleVersion = '0.4' + ModuleVersion = '0.4.1' RootModule = 'ugit.psm1' FormatsToProcess = 'ugit.format.ps1xml' TypesToProcess = 'ugit.types.ps1xml' @@ -17,262 +17,24 @@ PrivateData = @{ LicenseURI = 'https://github.com/StartAutomating/ugit/blob/main/LICENSE' BuildModule = @('EZOut', 'Piecemeal', 'PipeScript', 'PSSVG') ReleaseNotes = @' -## 0.4: +## 0.4.1: -* Adding Sponsorship! (#174) -* RealGit / GitReal will opt-out of ugit (#173) -* Added git.commit.info.psuh (#111) -* Fixing directory piping (#172) -* Git Clone allows absolute paths (#169, thanks @corbob) -* Fixing Git Log -Statistics (#171) -* Not Mapping Partial Dynamic Parameters (#168) - --- - -## 0.3.9: - -* Adding ugit demo (Fixes #163) -* Use-Git: Improving -Confirm (Fixes #165) and -WhatIf (Fixes #162) -* git.log.input - * Adding -NumberOfCommits (#161/#156) - * Adding -SearchPattern (Fixes #158) - * Adding -SearchString (Fixes #157) - * Adding -Statistics (Fixes #155) -* Adding git.branch IsTracked (Fixes #160) -* Extending FileInfo for better git results (Fixes #153) (thanks @ninmonkey) -* Adding ugit.extension formatting (Fixes #164) -* git log formatting - right-aligning CommitMessage (Fixes #152) (thanks @ninmonkey) -* git log .diff FileChange fix (Fixes #151) -* Git Diff ChangeSet Formatting Fix (Fixes #150) -* Updating workflow (Using GitLogger) - - -## 0.3.8: - -* Use-Git can now be extended (#140, #97), letting you add PowerShell parameters to any git command -* Initial input extensions - * git.clone.input (#141) (--progress is inferred so Write-Progress happens automagically) - * git.log.input (#142) (Added -Before/-After/-Author/-CurrentBranch) - * git.commit.input (#144) (Added -Message/-Body/-Title/-Trailer) -* Other Improvements: - * git log will not process --pretty/--format (Fixes #143) - * git log now supports .Trailers (Fixes #112) - * git remote formatting improved (Fixes #145) - * git remote now works for multiple remotes (Fixes #136) - * Updated logo (#139) - ---- - -## 0.3.7: - -* git remote - * Now supporting git remote! (Fixes #129) - -~~~PowerShell -git remote | git remote show -~~~ - -Also, some improvements to the GitHub Action: - -* Icon Update (Fixes #132) -* No longer using set-output (Fixes #131) -* Adding -InstallModule to Action (Fixes #132) +* New Git Command Support: + * git submodule status (#183) +* New Git ScriptMethods: + * git.branch.diff (#187) + * git.branch.rename (#86) +* Easier Input: + * git commit -CommitDate (#184) + * git log -CurrentBranch (fixing forks, #179) +* Announcing Releases with [PSA](https://github.com/StartAutomating/PSA) --- -## 0.3.6: - -* git log - * Supporting --stat (Fixes #123) - * Supporting --shortstat (Fixes #102) - * Adding .GitOutputLines (Fixes #122) -* git diff - * Fixing subdirectory issue (Fixes #121) - ---- - -## 0.3.5: - -* Use-Git: Fixing pipeline behavior for non-file input (Fixes #119) -* Git.log: Attaching .GitCommand, not .GitArgument (Fixes #118) -* Git.mv: Reducing liklihood of errors in directory moves (Fixes #117) - ---- - -## 0.3.4: - -* Improving pipeling behavior (Fixes #110) -* Adding tests for pipelining - ---- - -## 0.3.3: - -* New Extensions: - * git grep (Fixes #101) - * --name-only support (Fixes #103) -* -WhatIf now returns a [ScriptBlock] (Fixes #90) -* Git.FileOutput: Test-Path before Get-Item (Fixes #106) - ---- - -## 0.3.2: - -* git diff now includes .File and .GitRoot (Fixes #93) -* git pull no longer includes 'files changed' when no files change (Fixes #92) - ---- - -## 0.3.1: - -* git help --all now returns as objects (Fixes #88) -* (git log .\filename).Diff() now only diffs the selected files (Fixes #87) -* git -C is permitted in any direectory (Fixes #85) - ---- - -## 0.3: - -* Adding git version and git help to list of commands that do not require a repo (Fixes #79) (Thanks @charltonstanley!) - --- - -## 0.2.9: -* Adding support for git init (Fixes #75) - ---- - -## 0.2.8: -* Adding support for git rm (Fixes #73) - ---- - -## 0.2.7: -* Adding support for git mv (#70, thanks @ninmonkey !) - ---- - -## 0.2.6: -* Fixing git diff for binary files (#47) - ---- +Additional Changes in [Changelog](/CHANGELOG.md) +Like It? Start It. Love It? Support It. +https://github.com/StartAutomating/ugit -## 0.2.5: -* Improving .Merged support for git log (#68) -* git log now also returns: - * [int] .PullRequestNumber (the pull request number) - * .Source (the source branch of a merge) - * .Destination (the destination branch of a merge) - ---- - -## 0.2.4: -* Adding support for git stash (#65) -* Allowing git diff extension to display git stash show --patch (#66) - ---- - -## 0.2.3: -* Adding types for git.reference.log (#61 #62) - ---- - -## 0.2.2: -* Outputting hints as warnings (#56) -* Improved support for git pull (#57) -* Auto-building depedencies (#58) -* Consolidating CI/CD (#59) - ---- - -## 0.2.1: -* Adding support for git shortlog (#48) -* Adding .GitRoot to git reflog (#53) -* Extension documentation cleanup (#54) - ---- - -## 0.2.0: -* Adding support for git reflog (#51) - ---- - -## 0.1.9.1: -* Fixing git status duplicate message (#49) - ---- - -## 0.1.9: -* Support for eventing (#42) -* Autogeneration of docs (#43) -* Autogeneration of formatting (#44) -* Fixing git status formatting (#45) - ---- - -## 0.1.8: -* Adding Support for git checkout (#38) -* Use-Git: Avoiding unwanted confirmation ( Fixing #39 ) - ---- - -## 0.1.7: -* Use-Git: -Verbose no longer infers --verbose (#10) -* Out-Git: Support for extension caching (#35) -* Out-Git: Using -ErrorAction Ignore when -Verbose is not passed (#36) -* Get-UGitExtension: Updating Piecemeal Version [0.2.1]. (Re #32 #36) - ---- - -## 0.1.6 -* Adding support / formatting for git pull (#26) -* Out-Git: Extension Improvements (#33) - ---- - -## 0.1.5 -* Adding git.log .Checkout() and Revert() (#27, #28) -* Fixing formatting for git diff (#25) -* Out-Git: Adding History (#30) -* Use-Git: SupportsShouldProcess (#29) - ---- - -## 0.1.4 -* Adding git.log.reset() (#20) -* Adding git clone extension (#17) -* Use-Git: Running certain git commands when there is no repo (currently clone and init) -* Use-Git: Support for progress bars (#18). Warning when repo not found (#21) -* git branch extension: Adding example -* Highlighting branch name (fixing #19) - ---- - -## 0.1.3 -* Updating git.log extension: Adding .Merged (#16) -* Updating git push extension: Support for first push (#14) -* Adding .output to automatic typenames (Fixing #11) -* Adding .ToString to git.branch and git.branch.detail (#9) -* Updating git branch extension: Fixing --delete behavior (#13) -* Use-Git: Support for -d/-D/-v/-V (#12). -Verbose implies --verbose (#10) - ---- - -## 0.1.2 -* Support for git push (#7) -* Adding .Amend/.UpdateMessage to git.commit.info (#6) - ---- - -## 0.1.1 -* Support for git commit (#4) - ---- - -## 0.1 -* Initial Release of ugit - ---- '@ } } From d81f224c208f196409cb6b0fd59197294327ae1a Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 5 Oct 2023 06:50:57 +0000 Subject: [PATCH 55/55] Updating ugit module version [0.4.1] and CHANGELOG --- docs/CHANGELOG.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 32d2d942..46cf79de 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,3 +1,17 @@ +## 0.4.1: + +* New Git Command Support: + * git submodule status (#183) +* New Git ScriptMethods: + * git.branch.diff (#187) + * git.branch.rename (#86) +* Easier Input: + * git commit -CommitDate (#184) + * git log -CurrentBranch (fixing forks, #179) +* Announcing Releases with [PSA](https://github.com/StartAutomating/PSA) + +--- + ## 0.4: * Adding Sponsorship! (#174)