Git fork
at reftables-rust 26 lines 615 B view raw
1#!/bin/sh 2 3# If "one-time-script" exists in $HTTPD_ROOT_PATH, run the script on the HTTP 4# response. If the response was modified as a result, delete "one-time-script" 5# so that subsequent HTTP responses are no longer modified. 6# 7# This can be used to simulate the effects of the repository changing in 8# between HTTP request-response pairs. 9if test -f one-time-script 10then 11 LC_ALL=C 12 export LC_ALL 13 14 "$GIT_EXEC_PATH/git-http-backend" >out 15 ./one-time-script out >out_modified 16 17 if cmp -s out out_modified 18 then 19 cat out 20 else 21 cat out_modified 22 rm one-time-script 23 fi 24else 25 "$GIT_EXEC_PATH/git-http-backend" 26fi