]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
post-receive.hook: rename detection
authorJan Remmet <j.remmet@phytec.de>
Tue, 19 Apr 2016 08:21:23 +0000 (10:21 +0200)
committerStephen Finucane <stephen.finucane@intel.com>
Mon, 9 May 2016 12:55:21 +0000 (13:55 +0100)
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 <j.remmet@phytec.de>
Reviewed-by: Stephen Finucane <stephen.finucane@intel.com>
tools/post-receive.hook

index 8f05b8d85dc3e98c3c63a4a3ca0b813ae26e79c8..78ddf9b2f107bf8e989203d743219351a9269f9e 100755 (executable)
@@ -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"
 }