[dots] only verify remote tip

simpler, and actually works when local branch diverges.
This commit is contained in:
odrling 2024-02-21 01:09:59 +01:00
parent 3e2696f382
commit 8cc0d4689a
No known key found for this signature in database
GPG key ID: E24CA7508C27AF5B

View file

@ -1,15 +1,11 @@
#!/bin/sh -e
start_hash=$(git log -n 1 --pretty=format:"%H")
remote=$(git rev-parse --abbrev-ref --symbolic-full-name @{u})
git fetch "$(echo $remote | sed 's|/.*$||')"
end_hash=$(git rev-parse '@{u}')
remote=$(git rev-parse --abbrev-ref --symbolic-full-name '@{u}')
git fetch "$(echo "$remote" | sed 's|/.*$||')"
command -v gpg > /dev/null || echo gpg not found
gpg --import ~/.local/odrling.pub 2> /dev/null
if [ "$start_hash" != "$end_hash" ]; then
git log --pretty=format:"%H" "${start_hash}^..${end_hash}" | xargs dots verify-commit
git rebase --autostash "$remote"
fi
dots verify-commit "$remote"
git rebase --autostash "$remote"
dots-postupdate