Skip to content

Commit

Permalink
feat: git.log.note(s) ( Fixes #296 )
Browse files Browse the repository at this point in the history
Improving performance
  • Loading branch information
James Brundage committed Sep 25, 2024
1 parent 92c2472 commit 8d9c127
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions Types/git.log/get_Note.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@
.DESCRIPTION
Gets git notes associated with a commit.
#>
Push-Location $this.GitRoot
git notes show $this.CommitHash
Pop-Location
$pushed =
if ($this.GitRoot -ne $pwd) {
Push-Location $this.GitRoot
$true
} else {
$false
}
$showNotes = git notes show $this.CommitHash *>&1
if ($showNotes -isnot [Management.Automation.ErrorRecord]) {
$showNotes
} else {
$error.RemoveAt(0)
}
if ($pushed) {
Pop-Location
}

0 comments on commit 8d9c127

Please sign in to comment.