]> Tony Duckles's Git Repositories (git.nynim.org) - dotfiles.git/blob - bin/git-pruneall
Merge branch 'master' into epic
[dotfiles.git] / bin / git-pruneall
1 #!/bin/sh -e
2 # Usage: git-pruneall [<remote>...]
3 # Prune branches from specified remotes, or all remotes when
4 # <remote> not specified.
5
6 REMOTES="$@"
7
8 test -z "$REMOTES" &&
9 REMOTES=$(git remote)
10
11 for remote in $REMOTES
12 do
13 echo "pruning: $remote"
14 git remote prune "$remote" || true
15 done
16
17 # Copyright (c) 2009 Ryan Tomayko <tomayko.com/about>
18 #
19 # Permission is hereby granted, free of charge, to any person obtaining a copy
20 # of this software and associated documentation files (the "Software"), to
21 # deal in the Software without restriction, including without limitation the
22 # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
23 # sell copies of the Software, and to permit persons to whom the Software is
24 # furnished to do so, subject to the following conditions:
25 #
26 # The above copyright notice and this permission notice shall be included in
27 # all copies or substantial portions of the Software.
28 #
29 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
30 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
32 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
33 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
34 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
35 # IN THE SOFTWARE.