diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2019-07-25 10:49:59 +0100 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2019-07-25 10:49:59 +0100 |
commit | 1f8e6e4fa8a42a9b6462542fbc10f7723c2e3af0 (patch) | |
tree | 15d1fd5105b9b7786bc1a81199a3725cc3889ade /bin/git-dotfiles-update-master | |
parent | 99d0bf243252b936cdebd12931076e0ad6808399 (diff) | |
download | dotfiles-1f8e6e4fa8a42a9b6462542fbc10f7723c2e3af0.tar.gz |
comments
Diffstat (limited to 'bin/git-dotfiles-update-master')
-rwxr-xr-x | bin/git-dotfiles-update-master | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/bin/git-dotfiles-update-master b/bin/git-dotfiles-update-master index 04ae7c87..961c3f74 100755 --- a/bin/git-dotfiles-update-master +++ b/bin/git-dotfiles-update-master @@ -1,22 +1,22 @@ #!/bin/sh -set -e - -. $HOME/.shenv - -# TODO generalise to a script that reads a git config value for the -# fingerprint to look for, updates branches specified by user and is -# able to handle updating by both merge and rebase - -# And instead of parsing the --raw output, use the technique in -# propellor's verifyOriginBranch function -- more robust - # Before running this script, will want to unset all upstreams: # for head in $(git for-each-ref --format='%(refname)' refs/heads/); do # branch=$(echo "$head" | cut -d/ -f3) # git branch --unset-upstream "$branch" 2>/dev/null || true # done +# Could generalise to a script that reads a git config value for the +# fingerprint to look for, updates branches specified by user and is +# able to handle updating by both merge and rebase + +# Could do that propellor does in verifyOriginBranch instead of this +# -- it might be more robust + +set -e + +. $HOME/.shenv + git fetch origin if git verify-commit --raw origin/master 2>&1 \ | grep "VALIDSIG .* 8DC2487E51ABDD90B5C4753F0F56D0553B6D411B"; then |