diff options
author | Dave Reisner <dreisner@archlinux.org> | 2014-09-12 08:52:27 -0400 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2014-09-12 08:52:27 -0400 |
commit | aaf7a6bda56c046f10016ab8324012e10bdd3385 (patch) | |
tree | 0c2e3e705896db809a2636460c2f5105a1867599 | |
parent | 1727738b8d5e4db7ffcb0e608aec19a29bf751b9 (diff) | |
download | asp32-aaf7a6bda56c046f10016ab8324012e10bdd3385.tar.xz |
mildly simplify ref-fetching with git-for-each-ref
-rw-r--r-- | remote.inc.sh | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/remote.inc.sh b/remote.inc.sh index ba72565..61204bf 100644 --- a/remote.inc.sh +++ b/remote.inc.sh @@ -46,9 +46,8 @@ remote_is_tracking() { remote_get_tracked_refs() { local remote=$1 - mapfile -t "$2" < <(git branch --remote 2>/dev/null | - awk -F'( +|/)' -v "remote=$1" \ - '$2 == remote && $3 == "packages" { print "packages/" $4 }') + mapfile -t "$2" < <(git for-each-ref --format='%(refname)' "refs/remotes/$1" | + awk -F'/' -v "remote=$1" '{ print "packages/" $NF }') } remote_update_refs() { |