From de80a09c157c2bb1ab626e44b160f3ffe0d67e0e Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Wed, 5 Apr 2017 19:33:23 -0400 Subject: remote: avoid need for awk post-processing --- remote.inc.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'remote.inc.sh') diff --git a/remote.inc.sh b/remote.inc.sh index db6d318..01031e0 100644 --- a/remote.inc.sh +++ b/remote.inc.sh @@ -45,8 +45,8 @@ remote_is_tracking() { remote_get_tracked_refs() { local remote=$1 - mapfile -t "$2" < <(git for-each-ref --format='%(refname)' "refs/remotes/$1" | - awk -F'/' -v "remote=$1" '{ print "packages/" $NF }') + mapfile -t "$2" < \ + <(git for-each-ref --format='%(refname:strip=3)' "refs/remotes/$remote") } remote_update_refs() { -- cgit v1.2.3-70-g09d2