Remove stale references
This commit is contained in:
parent
ead7d482ac
commit
124bc8584e
13
pusher
13
pusher
@ -168,6 +168,19 @@ for m in "${!pq[@]}"; do
|
||||
fi
|
||||
done
|
||||
|
||||
for m in "${!rq[@]}"; do
|
||||
[ "${#modules[@]}" -eq 0 -o -n "${modules[$m]}" ] || continue
|
||||
if [ -z "${pq[$m]}" ]; then
|
||||
log_info "delete remote request $m"
|
||||
if ! git send-pack --force "$push_url" ":refs/heads/update_$m"; then
|
||||
echo "failed to push $m update" >&2
|
||||
ret=1
|
||||
continue
|
||||
fi
|
||||
did_push=1
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -n "$did_push" ]; then
|
||||
log_info "Updating remote $PUSH_REMOTE"
|
||||
git remote update -p "$PUSH_REMOTE" > /dev/null
|
||||
|
@ -161,6 +161,14 @@ fi
|
||||
declare -A pq
|
||||
makedict pq git for-each-ref 'refs/pq/*' --format '%(refname)'
|
||||
|
||||
for r in "${!pq[@]}"; do
|
||||
m="${r##*/}"
|
||||
if [ -z "${revs[$m]}" ] && ! isnew "$m" && ! todrop "$m"; then
|
||||
log_info "remove stale update entry for $m"
|
||||
git update-ref -d "$r"
|
||||
fi
|
||||
done
|
||||
|
||||
# check remotes for updates
|
||||
declare -A commits
|
||||
treetext=$(git cat-file -p "$REMOTE/$BASE_BRANCH^{tree}")
|
||||
|
Loading…
Reference in New Issue
Block a user