summaryrefslogtreecommitdiff
path: root/tools/post-receive.hook
diff options
context:
space:
mode:
authorStephen Finucane <stephen@that.guru>2016-11-30 18:29:37 +0000
committerStephen Finucane <stephen@that.guru>2016-12-01 18:52:56 +0000
commiteda57a915378de582ed3e8c3a0ac5c4d800bba74 (patch)
tree509fb3cfb5541c2619ab0e2d628479a438d19ffd /tools/post-receive.hook
parent677de0ec7ee78222a51c9458e7a5b26956d59cb3 (diff)
downloadpatchwork-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/post-receive.hook')
-rwxr-xr-xtools/post-receive.hook2
1 files changed, 1 insertions, 1 deletions
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"
}