Skip to content

Commit

Permalink
Fix passing shell var to awk; add 'develop' branch to whitelist
Browse files Browse the repository at this point in the history
  • Loading branch information
whiteinge committed Apr 7, 2016
1 parent 4cf2513 commit a59b2ca
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .gitconfig
Expand Up @@ -49,8 +49,9 @@
# Delete all remote refs that have been merged into the current branch.
# Usage: git deleteremote <remote-name>
deleteremote = "!sh -c 'git branch -r --merged \
| awk -F/ '\\''/^ *${1}/ && !/master/ { print \"refs/heads/\" $2 }'\\'' \
| xargs -p git push ${1} --delete' -"
| awk -F/ -v remote=${1:?Missing remote name.} \
'\\''$0 ~ remote && !/(master|develop)/ { print \"refs/heads/\" $2 }'\\'' \
| xargs -p -r git push ${1} --delete' -"
l = log --format=format:'%C(auto)%h%d%C(reset) %s %C(bold blue)(%an, %ar)%C(reset)'
ll = log --stat --decorate --abbrev-commit --date=relative
Expand Down

0 comments on commit a59b2ca

Please sign in to comment.