summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--remote.inc.sh5
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() {