{"thread":{"id":"4712","subject":"[PATCH/RFH] Racy GIT (part #3)","startedAt":"2006-06-29T21:50:27Z","lastAt":"2006-06-30T07:43:00Z","messageCount":2,"participants":["Junio C Hamano","Uwe Zeisberger"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"22845","messageId":"7v7j2zpr6k.fsf@assigned-by-dhcp.cox.net","threadId":"4712","inReplyTo":null,"subject":"[PATCH/RFH] Racy GIT (part #3)","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-06-29T21:50:27Z","receivedAt":"2006-06-29T21:50:27Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Does everybody have \"cp -p\" to preserve the file timestamps on\nhis/her platform?  I am assuming this is safe (it is in POSIX),\nbut please raise hand if that is not a case for you.\n\n-- >8 --\nCommit 29e4d3635709778bcc808dbad0477efad82f8d7e fixed the\nunderlying update-index races but git-commit was not careful\nenough to preserve the index file timestamp when copying the\nindex file.  This caused t3402 test to occasionally fail.\n\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n---\n git-commit.sh |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/git-commit.sh b/git-commit.sh\nindex 7e50cf3..22c4ce8 100755\n--- a/git-commit.sh\n+++ b/git-commit.sh\n@@ -29,7 +29,7 @@ THIS_INDEX=\"$GIT_DIR/index\"\n NEXT_INDEX=\"$GIT_DIR/next-index$$\"\n rm -f \"$NEXT_INDEX\"\n save_index () {\n-\tcp \"$THIS_INDEX\" \"$NEXT_INDEX\"\n+\tcp -p \"$THIS_INDEX\" \"$NEXT_INDEX\"\n }\n \n report () {\n-- \n1.4.1.rc2.g3257-dirty\n"},{"id":"22898","messageId":"20060630074300.GA1643@informatik.uni-freiburg.de","threadId":"4712","inReplyTo":"7v7j2zpr6k.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH/RFH] Racy GIT (part #3)","fromName":"Uwe Zeisberger","fromEmail":"zeisberg@informatik.uni-freiburg.de","sentAt":"2006-06-30T07:43:00Z","receivedAt":"2006-06-30T07:43:00Z","isPatch":true,"sender":{"key":"u.kleine-koenig@pengutronix.de","avatar":"https://gravatar.com/avatar/354b5e3ceb2806a2f1e1e382ac29ddbdad18288654da62b61eb13583a857eee7?d=mp&s=160"},"body":"Hello,\n\nJunio C Hamano wrote:\n> Does everybody have \"cp -p\" to preserve the file timestamps on\n> his/her platform?  I am assuming this is safe (it is in POSIX),\n> but please raise hand if that is not a case for you.\nSolaris[1] has two different \"cp\"s[2].\n\n From cp(1):\n\t[...] [/usr/bin/cp] does not fail if unable to preserve extended\n\tattributes, modification and access time, or permission modes.\n\n\t[...] [/usr/xpg4/bin/cp] does not fail if unable to preserve\n\textended attributes.  If unable to duplicate the modification\n\tand access time or the permission modes, cp prints a diagnostic\n\tmessage to stderr and return a non-zero exit status.\n\n\nThere is yet an other difference when -@ is specified.  The complete man\npage can be found at docs.sun.com[2].\n\nBest regards\nUwe\n\n[1] in my case Solaris 10 = SunOS 5.10 and Solaris 9 = SunOS 5.9\n[2] http://docs.sun.com/app/docs/doc/816-5165/6mbb0m9dm?a=view\n\n-- \nUwe Zeisberger\n\nhttp://www.google.com/search?q=0+degree+Celsius+in+kelvin\n"}]}