From: Jan Remmet Date: Tue, 19 Apr 2016 08:21:23 +0000 (+0200) Subject: post-receive.hook: rename detection X-Git-Tag: v2.0.0-rc1~347 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=084008122e134401678ffc05882c2c75fd684471;p=thirdparty%2Fpatchwork.git post-receive.hook: rename detection patches which descripes renamed files show different hashes with git show and pwclient. Use git show -C (Detect copies as well as renames.) Signed-off-by: Jan Remmet Reviewed-by: Stephen Finucane --- diff --git a/tools/post-receive.hook b/tools/post-receive.hook index 8f05b8d8..78ddf9b2 100755 --- a/tools/post-receive.hook +++ b/tools/post-receive.hook @@ -23,7 +23,7 @@ trap "do_exit=1" INT get_patchwork_hash() { local hash - hash=$(git show $1 | python $PWDIR/parser.py --hash) + hash=$(git show -C $1 | python $PWDIR/parser.py --hash) echo $hash test -n "$hash" }