From 73abc07ebefc0d5c81262a321664ef2dcba698ec Mon Sep 17 00:00:00 2001 From: Luke Bakken Date: Thu, 24 Dec 2015 13:21:35 -0800 Subject: [PATCH 1/3] Use Out-File to specify ascii encoding. --- GitUtils.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GitUtils.ps1 b/GitUtils.ps1 index 5d91a45c7..501c6bf44 100644 --- a/GitUtils.ps1 +++ b/GitUtils.ps1 @@ -243,7 +243,7 @@ function Set-TempEnv($key, $value) { } } else { New-Item $path -Force -ItemType File > $null - $value > $path + $value | Out-File -FilePath $path -Encoding ascii -Force } } From ae971cea8bf3f7ad62d9777cd7847b882fe11dcc Mon Sep 17 00:00:00 2001 From: AQNOUCH Mohammed Date: Fri, 1 Jan 2016 01:06:26 +0000 Subject: [PATCH 2/3] Updated copyright to 2016 --- LICENSE.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE.txt b/LICENSE.txt index c47ceaae3..d81420990 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright (c) 2010-2013 Keith Dahlby and contributors +Copyright (c) 2010-2016 Keith Dahlby and contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: From 721089444e2ce9e2bfbcad0b5e0daa5ea8085d66 Mon Sep 17 00:00:00 2001 From: blue Date: Sun, 3 Jan 2016 13:55:00 +0000 Subject: [PATCH 3/3] Change Guess-Ssh/Pageant to use approved verb --- GitUtils.ps1 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/GitUtils.ps1 b/GitUtils.ps1 index 501c6bf44..34aa801ac 100644 --- a/GitUtils.ps1 +++ b/GitUtils.ps1 @@ -270,7 +270,7 @@ function Get-SshAgent() { } # Attempt to guess Pageant's location -function Guess-Pageant() { +function Find-Pageant() { Write-Verbose "Pageant not in path. Trying to guess location." $gitSsh = $env:GIT_SSH if ($gitSsh -and (test-path $gitSsh)) { @@ -281,7 +281,7 @@ function Guess-Pageant() { } # Attempt to guess $program's location. For ssh-agent/ssh-add. -function Guess-Ssh($program = 'ssh-agent') { +function Find-Ssh($program = 'ssh-agent') { Write-Verbose "$program not in path. Trying to guess location." $gitItem = Get-Command git -Erroraction SilentlyContinue | Get-Item if ($gitItem -eq $null) { Write-Warning 'git not in path'; return } @@ -308,12 +308,12 @@ function Start-SshAgent([switch]$Quiet) { if ($env:GIT_SSH -imatch 'plink') { Write-Host "GIT_SSH set to $($env:GIT_SSH), using Pageant as SSH agent." $pageant = Get-Command pageant -TotalCount 1 -Erroraction SilentlyContinue - $pageant = if ($pageant) {$pageant} else {Guess-Pageant} + $pageant = if ($pageant) {$pageant} else {Find-Pageant} if (!$pageant) { Write-Warning "Could not find Pageant."; return } Start-Process -NoNewWindow $pageant } else { $sshAgent = Get-Command ssh-agent -TotalCount 1 -ErrorAction SilentlyContinue - $sshAgent = if ($sshAgent) {$sshAgent} else {Guess-Ssh('ssh-agent')} + $sshAgent = if ($sshAgent) {$sshAgent} else {Find-Ssh('ssh-agent')} if (!$sshAgent) { Write-Warning 'Could not find ssh-agent'; return } & $sshAgent | foreach { @@ -335,7 +335,7 @@ function Get-SshPath($File = 'id_rsa') function Add-SshKey() { if ($env:GIT_SSH -imatch 'plink') { $pageant = Get-Command pageant -Erroraction SilentlyContinue | Select -First 1 -ExpandProperty Name - $pageant = if ($pageant) {$pageant} else {Guess-Pageant} + $pageant = if ($pageant) {$pageant} else {Find-Pageant} if (!$pageant) { Write-Warning 'Could not find Pageant'; return } if ($args.Count -eq 0) { @@ -351,7 +351,7 @@ function Add-SshKey() { } } else { $sshAdd = Get-Command ssh-add -TotalCount 1 -ErrorAction SilentlyContinue - $sshAdd = if ($sshAdd) {$sshAdd} else {Guess-Ssh('ssh-add')} + $sshAdd = if ($sshAdd) {$sshAdd} else {Find-Ssh('ssh-add')} if (!$sshAdd) { Write-Warning 'Could not find ssh-add'; return } if ($args.Count -eq 0) {