Skip to content

Commit 3c78e97

Browse files
tgummerergitster
authored andcommitted
Revert "t/lib-git-daemon: record daemon log"
This reverts commit 314a73d (t/lib-git-daemon: record daemon log, 2018-01-25), which let tests use the output of git-daemon. The previous commit removed the last user of deamon.log in the tests, there's no good way to make checking for output in the log race-proof. Revert this commit as well, to make sure others are not tempted to use daemon.log in tests in the future, which would lead to racy tests. The original commit had one change that still makes sense, namely switching read/echo for "read -r" and "printf", which relays the data more faithfully. Don't revert that piece here, as it is still a useful change. Suggested-by: Jeff King <[email protected]> Signed-off-by: Thomas Gummerer <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f24eaf4 commit 3c78e97

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

t/lib-git-daemon.sh

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -54,19 +54,11 @@ start_git_daemon() {
5454
"$@" "$GIT_DAEMON_DOCUMENT_ROOT_PATH" \
5555
>&3 2>git_daemon_output &
5656
GIT_DAEMON_PID=$!
57-
>daemon.log
5857
{
5958
read -r line <&7
60-
printf "%s\n" "$line"
61-
printf >&4 "%s\n" "$line"
62-
(
63-
while read -r line <&7
64-
do
65-
printf "%s\n" "$line"
66-
printf >&4 "%s\n" "$line"
67-
done
68-
) &
69-
} 7<git_daemon_output >>"$TRASH_DIRECTORY/daemon.log" &&
59+
printf "%s\n" "$line" >&4
60+
cat <&7 >&4 &
61+
} 7<git_daemon_output &&
7062

7163
# Check expected output
7264
if test x"$(expr "$line" : "\[[0-9]*\] \(.*\)")" != x"Ready to rumble"

0 commit comments

Comments
 (0)