1102.1.1
by Curtis Hovey
Added a hack that lists the 10 most recent branches by age, oldest to new. |
1 |
#!/bin/bash
|
2 |
||
3 |
REPO=$1 |
|
4 |
shift
|
|
5 |
PRIORITIES=$@ |
|
6 |
||
7 |
cd $REPO |
|
1107.1.2
by Curtis Hovey
Use tac (gnu reverse sultion) always prune deleted refs from local repo. |
8 |
git fetch -p -q 2>&1>/dev/null |
1102.1.1
by Curtis Hovey
Added a hack that lists the 10 most recent branches by age, oldest to new. |
9 |
RECENT=$(git for-each-ref \ |
10 |
--format='gitbranch:%(refname:short):github.com/juju/juju' \ |
|
11 |
--sort -committerdate --count 11 refs/remotes/origin/ | \ |
|
1107.1.2
by Curtis Hovey
Use tac (gnu reverse sultion) always prune deleted refs from local repo. |
12 |
sed -e '/HEAD/d; s,origin/,,' | tac | tr -s '\n' ' ') |
1102.1.3
by Curtis Hovey
added newline. |
13 |
echo "$PRIORITIES $RECENT" |