Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/remote.inc.sh
diff options
context:
space:
mode:
Diffstat (limited to 'remote.inc.sh')
-rw-r--r--remote.inc.sh11
1 files changed, 5 insertions, 6 deletions
diff --git a/remote.inc.sh b/remote.inc.sh
index 01031e0..226d566 100644
--- a/remote.inc.sh
+++ b/remote.inc.sh
@@ -1,12 +1,11 @@
__remote_refcache_update() {
- local remote=$1 cachefile=$ASPCACHE/remote-$remote
+ local remote=$1 cachefile=$ASPCACHE/remote-$remote refs
- # shellcheck disable=SC2064
- trap "rm -f '$cachefile~'" RETURN
+ refs=$(git ls-remote "$remote" 'refs/heads/packages/*') ||
+ log_fatal "failed to update remote $remote"
- git ls-remote "$remote" 'refs/heads/packages/*' |
- awk '{ sub(/refs\/heads\//, "", $2); print $2 }' >"$cachefile~" &&
- mv "$cachefile"{~,}
+ printf '%s' "$refs" |
+ awk '{ sub(/refs\/heads\//, "", $2); print $2 }' >"$cachefile"
}
__remote_refcache_get() {