From cc7d5bcf006e92d554cae0aefc9d8681d4659dce Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Thu, 29 Jun 2006 14:48:22 -0700 Subject: [PATCH] Racy GIT (part #3) Commit 29e4d3635709778bcc808dbad0477efad82f8d7e fixed the underlying update-index races but git-commit was not careful enough to preserve the index file timestamp when copying the index file. This caused t3402 test to occasionally fail. Signed-off-by: Junio C Hamano --- git-commit.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-commit.sh b/git-commit.sh index 7e50cf399..22c4ce86c 100755 --- a/git-commit.sh +++ b/git-commit.sh @@ -29,7 +29,7 @@ THIS_INDEX="$GIT_DIR/index" NEXT_INDEX="$GIT_DIR/next-index$$" rm -f "$NEXT_INDEX" save_index () { - cp "$THIS_INDEX" "$NEXT_INDEX" + cp -p "$THIS_INDEX" "$NEXT_INDEX" } report () { -- 2.30.2