diff options
author | Stephen Finucane <stephen@that.guru> | 2016-11-30 18:29:37 +0000 |
---|---|---|
committer | Stephen Finucane <stephen@that.guru> | 2016-12-01 18:52:56 +0000 |
commit | eda57a915378de582ed3e8c3a0ac5c4d800bba74 (patch) | |
tree | 509fb3cfb5541c2619ab0e2d628479a438d19ffd /tools | |
parent | 677de0ec7ee78222a51c9458e7a5b26956d59cb3 (diff) | |
download | patchwork-eda57a915378de582ed3e8c3a0ac5c4d800bba74.tar patchwork-eda57a915378de582ed3e8c3a0ac5c4d800bba74.tar.gz |
tools: Update to use 'hasher'
The old 'parser' module used to extract diffs from their surrounding
mbox fluff before hashing this. Seeing as this was only used in the
context of an actual git repo, avoid all of that rigmarole by just using
'git diff', which produces a plain diff, rather than 'git show'.
Signed-off-by: Stephen Finucane <stephen@that.guru>
Tested-by: Tom Rini <trini@konsulko.com>
Closes-bug: #63
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/patchwork-update-commits | 2 | ||||
-rwxr-xr-x | tools/post-receive.hook | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tools/patchwork-update-commits b/tools/patchwork-update-commits index d0f63a9..61952c0 100755 --- a/tools/patchwork-update-commits +++ b/tools/patchwork-update-commits @@ -29,6 +29,6 @@ fi git rev-list --reverse "$@" | while read commit; do - hash=$(git show "$commit" | python $pwpath/parser.py -#) + hash=$(git diff "$commit~..$commit" | python $pwpath/hasher.py) $pwpath/bin/pwclient update -s Accepted -c "$commit" -h "$hash" done diff --git a/tools/post-receive.hook b/tools/post-receive.hook index 2fd037f..42de90a 100755 --- a/tools/post-receive.hook +++ b/tools/post-receive.hook @@ -37,7 +37,7 @@ trap "do_exit=1" INT get_patchwork_hash() { local hash - hash=$(git show -C $1 | python $PWDIR/parser.py --hash) + hash=$(git diff "$1~..$1" | python $PWDIR/hasher.py) echo $hash test -n "$hash" } |