X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=backup_git_dirs;h=f2d20553b9227ad94599588a7a915019d304488a;hb=7cf9d72f20a26380d6bb15db1c2f111b104710dc;hp=9822babd606df62130724a72ca26d9591ecf3bc1;hpb=d5a5b224b549dc17f472fc8a13270d6041f62546;p=perso%2FImmae%2FProjets%2FScripts%2FPublic.git diff --git a/backup_git_dirs b/backup_git_dirs index 9822bab..f2d2055 100755 --- a/backup_git_dirs +++ b/backup_git_dirs @@ -21,6 +21,9 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. + +# Feel like tipping/donating? https://www.immae.eu/licenses_and_tipping + REMOTE=origin REF_NS=auto_backup @@ -47,13 +50,13 @@ function backup_refs() { git read-tree HEAD head_commit=$(git show-ref --hash --head ^HEAD) git add . - COMMIT=`git commit-tree $(git write-tree) -p $head_commit -m "Automatic backup"` + COMMIT=`git commit-tree --no-gpg-sign $(git write-tree) -p $head_commit -m "Automatic backup"` git update-ref refs/$REF_NS/workdir $COMMIT rm -f "$GIT_INDEX_FILE" unset GIT_INDEX_FILE if git remote | grep -q "^$REMOTE$"; then - git push -q --force $REMOTE "refs/$REF_NS/*:refs/$REF_NS/*" + git push --no-verify --no-signed -q --force $REMOTE "refs/$REF_NS/*:refs/$REF_NS/*" git for-each-ref --format='%(refname)' refs/$REF_NS | while read ref; do git update-ref -d "$ref" done