File tree Expand file tree Collapse file tree 3 files changed +38
-0
lines changed Expand file tree Collapse file tree 3 files changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -257,10 +257,19 @@ function gpoat {
257
257
git push origin -- all
258
258
git push origin -- tags
259
259
}
260
+ function gpr {
261
+ git pull -- rebase $args
262
+ }
263
+ function gpra {
264
+ git pull -- rebase -- autostash $args
265
+ }
260
266
function gpristine {
261
267
git reset -- hard
262
268
git clean - dfx
263
269
}
270
+ function gprv {
271
+ git pull -- rebase - v $args
272
+ }
264
273
function gpu {
265
274
git push upstream $args
266
275
}
@@ -394,12 +403,15 @@ function gunwip {
394
403
git reset HEAD~1
395
404
}
396
405
function gup {
406
+ Write-Host - Deprecated " gup" " gpr"
397
407
git pull -- rebase $args
398
408
}
399
409
function gupa {
410
+ Write-Host - Deprecated " gupa" " gpra"
400
411
git pull -- rebase -- autostash $args
401
412
}
402
413
function gupv {
414
+ Write-Host - Deprecated " gupv" " gprv"
403
415
git pull -- rebase - v $args
404
416
}
405
417
function glum {
Original file line number Diff line number Diff line change @@ -79,7 +79,10 @@ $FunctionsToExport = @(
79
79
' gpf' ,
80
80
' gpf!' ,
81
81
' gpoat' ,
82
+ ' gpr' ,
83
+ ' gpra' ,
82
84
' gpristine' ,
85
+ ' gprv' ,
83
86
' gpu' ,
84
87
' gpv' ,
85
88
' gr' ,
Original file line number Diff line number Diff line change @@ -133,3 +133,26 @@ function Get-Git-Aliases ([string] $Alias) {
133
133
134
134
return Format-Table - InputObject $aliases - AutoSize - Wrap - Property $cols
135
135
}
136
+
137
+ <#
138
+ . SYNOPSIS
139
+ Print deprecated message.
140
+ . DESCRIPTION
141
+ Print a colored message telling that a specific alias ($previous)
142
+ is deprecated, suggesting the use of another alias ($next).
143
+ . EXAMPLE
144
+ PS C:\> Write-Host-Deprecated "gup" "gpr"
145
+ [git-aliases] gup is a deprecated alias, use "gpr" instead.
146
+ #>
147
+ function Write-Host-Deprecated {
148
+ param (
149
+ [Parameter (Mandatory = $true )][string ] $previous ,
150
+ [Parameter (Mandatory = $true )][string ] $next
151
+ )
152
+
153
+ Write-Host " [git-aliases] " - ForegroundColor Yellow - NoNewLine
154
+ Write-Host " ${previous} " - ForegroundColor Red - NoNewLine
155
+ Write-Host " is a deprecated alias, use " - ForegroundColor Yellow - NoNewLine
156
+ Write-Host " "" ${next} "" " - ForegroundColor Green - NoNewLine
157
+ Write-Host " instead.`n " - ForegroundColor Yellow
158
+ }
You can’t perform that action at this time.
0 commit comments