[PATCH] Fixed/Extended example for update hook
[gitweb.git] / git-fetch-script
index 24f0a5ec82e7268f6dcb0beefb6dbe0f7f54f463..ea097144f712f9ef1beb0531f1bf945db9485c3f 100755 (executable)
@@ -31,6 +31,10 @@ rsync://*)
        ;;
 *)
        head=$(git-fetch-pack "$merge_repo" "$merge_head")
+       if h=`expr "$head" : '\([^ ][^ ]*\) '`
+       then
+           head=$h
+       fi
        ;;
 esac || exit 1