summaryrefslogtreecommitdiff
path: root/t/lib-httpd/apply-one-time-sed.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/lib-httpd/apply-one-time-sed.sh')
-rw-r--r--t/lib-httpd/apply-one-time-sed.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/t/lib-httpd/apply-one-time-sed.sh b/t/lib-httpd/apply-one-time-sed.sh
index fcef728925..bf7689d020 100644
--- a/t/lib-httpd/apply-one-time-sed.sh
+++ b/t/lib-httpd/apply-one-time-sed.sh
@@ -7,11 +7,13 @@
#
# This can be used to simulate the effects of the repository changing in
# between HTTP request-response pairs.
-if [ -e one-time-sed ]; then
+if test -f one-time-sed
+then
"$GIT_EXEC_PATH/git-http-backend" >out
- sed "$(cat one-time-sed)" <out >out_modified
+ sed "$(cat one-time-sed)" out >out_modified
- if diff out out_modified >/dev/null; then
+ if cmp -s out out_modified
+ then
cat out
else
cat out_modified