Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. $commitOffset = 1
  2. $additionThreshold = 50
  3. $commits = git diff HEAD HEAD~$commitOffset --numstat | ConvertFrom-Csv -Header 'Additions','Deletions','File' -Delimiter "`t"
  4. $commits = $commits | ? {$_.Additions -ne '-' -and $_.Additions -ne '0'}
  5. $commits | % { $_.Additions = [int]$_.Additions; $_.Deletions = [int]$_.Deletions }
  6. $commits = $commits | ? {($_.Additions - $_.Deletions_) -gt $additionThreshold}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement