{"thread":{"id":"13560","subject":"[PATCH] t7701-repack-unpack-unreachable.sh: check timestamp of unpacked objects","startedAt":"2008-05-18T04:00:00Z","lastAt":"2008-05-19T21:48:48Z","messageCount":6,"participants":["drafnel@gmail.com","Junio C Hamano","Brandon Casey","Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"77215","messageId":"16342222.1211083116270.JavaMail.teamon@b306.teamon.com","threadId":"13560","inReplyTo":null,"subject":"[PATCH] t7701-repack-unpack-unreachable.sh: check timestamp of unpacked objects","fromName":"","fromEmail":"drafnel@gmail.com","sentAt":"2008-05-18T04:00:00Z","receivedAt":"2008-05-18T04:00:00Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"From: Brandon Casey <drafnel@gmail.com>\n\nUnpacked objects should receive the timestamp of the pack they were\nunpacked from. Check.\n\nSigned-off-by: Brandon Casey <drafnel@gmail.com>\n---\n t/t7701-repack-unpack-unreachable.sh |   28 ++++++++++++++++++++++++++++\n 1 files changed, 28 insertions(+), 0 deletions(-)\n\ndiff --git a/t/t7701-repack-unpack-unreachable.sh b/t/t7701-repack-unpack-unreachable.sh\nindex 6a5211f..bdb00d4 100755\n--- a/t/t7701-repack-unpack-unreachable.sh\n+++ b/t/t7701-repack-unpack-unreachable.sh\n@@ -4,6 +4,10 @@ test_description='git-repack works correctly'\n \n . ./test-lib.sh\n \n+fsha1=\n+csha1=\n+tsha1=\n+\n test_expect_success '-A option leaves unreachable objects unpacked' '\n \techo content > file1 &&\n \tgit add . &&\n@@ -44,4 +48,28 @@ test_expect_success '-A option leaves unreachable objects unpacked' '\n \tgit show $tsha1\n '\n \n+test_expect_success 'unpacked objects receive timestamp of pack file' '\n+\tfsha1path=$(echo \"$fsha1\" | sed -e \"s/\\(..\\)\\(.*\\)/\\1\\/\\2/\") &&\n+\tfsha1path=\".git/objects/$fsha1path\" &&\n+\tcsha1path=$(echo \"$csha1\" | sed -e \"s/\\(..\\)\\(.*\\)/\\1\\/\\2/\") &&\n+\tcsha1path=\".git/objects/$csha1path\" &&\n+\ttsha1path=$(echo \"$tsha1\" | sed -e \"s/\\(..\\)\\(.*\\)/\\1\\/\\2/\") &&\n+\ttsha1path=\".git/objects/$tsha1path\" &&\n+\tgit branch transient_branch $csha1 &&\n+\tgit repack -a -d -l &&\n+\ttest ! -f \"$fsha1path\" &&\n+\ttest ! -f \"$csha1path\" &&\n+\ttest ! -f \"$tsha1path\" &&\n+\ttest 1 = $(ls -1 .git/objects/pack/pack-*.pack | wc -l) &&\n+\tpackfile=$(ls .git/objects/pack/pack-*.pack) &&\n+\tgit branch -D transient_branch &&\n+\tgit repack -A -l &&\n+\ttest -f \"$fsha1path\" -a ! \"$fsha1path\" -nt \"$packfile\" -a \\\n+\t\t\t\t! \"$fsha1path\" -ot \"$packfile\" &&\n+\ttest -f \"$csha1path\" -a ! \"$csha1path\" -nt \"$packfile\" -a \\\n+\t\t\t\t! \"$csha1path\" -ot \"$packfile\" &&\n+\ttest -f \"$tsha1path\" -a ! \"$tsha1path\" -nt \"$packfile\" -a \\\n+\t\t\t\t! \"$tsha1path\" -ot \"$packfile\"\n+'\n+\n test_done\n-- \n1.5.5.1.447.geb0a7\n"},{"id":"77252","messageId":"7vd4niaozy.fsf@gitster.siamese.dyndns.org","threadId":"13560","inReplyTo":"16342222.1211083116270.JavaMail.teamon@b306.teamon.com","subject":"Re: [PATCH] t7701-repack-unpack-unreachable.sh: check timestamp of unpacked objects","fromName":"Junio C Hamano","fromEmail":"junio@pobox.com","sentAt":"2008-05-19T04:37:05Z","receivedAt":"2008-05-19T04:37:05Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"drafnel@gmail.com writes:\n\n\n> +\ttest -f \"$fsha1path\" -a ! \"$fsha1path\" -nt \"$packfile\" -a \\\n> +\t\t\t\t! \"$fsha1path\" -ot \"$packfile\" &&\n> +\ttest -f \"$csha1path\" -a ! \"$csha1path\" -nt \"$packfile\" -a \\\n> +\t\t\t\t! \"$csha1path\" -ot \"$packfile\" &&\n> +\ttest -f \"$tsha1path\" -a ! \"$tsha1path\" -nt \"$packfile\" -a \\\n> +\t\t\t\t! \"$tsha1path\" -ot \"$packfile\"\n> +'\n\n\"Test\" primaries -nt/-ot are unfortunately excluded from POSIX.\n"},{"id":"77273","messageId":"OleexvYZfiSxUgrxHbDqLpGl2g7TsoOO7pwZXC1fiyL2KxKVuWLtWw@cipher.nrlssc.navy.mil","threadId":"13560","inReplyTo":"7vd4niaozy.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] t7701-repack-unpack-unreachable.sh: check timestamp of unpacked objects","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2008-05-19T14:20:05Z","receivedAt":"2008-05-19T14:20:05Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"Junio C Hamano wrote:\n> drafnel@gmail.com writes:\n> \n> \n>> +\ttest -f \"$fsha1path\" -a ! \"$fsha1path\" -nt \"$packfile\" -a \\\n>> +\t\t\t\t! \"$fsha1path\" -ot \"$packfile\" &&\n>> +\ttest -f \"$csha1path\" -a ! \"$csha1path\" -nt \"$packfile\" -a \\\n>> +\t\t\t\t! \"$csha1path\" -ot \"$packfile\" &&\n>> +\ttest -f \"$tsha1path\" -a ! \"$tsha1path\" -nt \"$packfile\" -a \\\n>> +\t\t\t\t! \"$tsha1path\" -ot \"$packfile\"\n>> +'\n> \n> \"Test\" primaries -nt/-ot are unfortunately excluded from POSIX.\n\nhrmph, and it even worked on solaris ksh.\n\n-brandon\n"},{"id":"77289","messageId":"E8K6ZsektNV-bzzpBDDSjLUNAu6_Tgxq9EV2896g2zCI6VyLsESxXw@cipher.nrlssc.navy.mil","threadId":"13560","inReplyTo":"OleexvYZfiSxUgrxHbDqLpGl2g7TsoOO7pwZXC1fiyL2KxKVuWLtWw@cipher.nrlssc.navy.mil","subject":"Re: [PATCH] t7701-repack-unpack-unreachable.sh: check timestamp of unpacked objects","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2008-05-19T20:27:02Z","receivedAt":"2008-05-19T20:27:02Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"Brandon Casey wrote:\n> Junio C Hamano wrote:\n>> drafnel@gmail.com writes:\n>>\n>>\n>>> +\ttest -f \"$fsha1path\" -a ! \"$fsha1path\" -nt \"$packfile\" -a \\\n>>> +\t\t\t\t! \"$fsha1path\" -ot \"$packfile\" &&\n>>> +\ttest -f \"$csha1path\" -a ! \"$csha1path\" -nt \"$packfile\" -a \\\n>>> +\t\t\t\t! \"$csha1path\" -ot \"$packfile\" &&\n>>> +\ttest -f \"$tsha1path\" -a ! \"$tsha1path\" -nt \"$packfile\" -a \\\n>>> +\t\t\t\t! \"$tsha1path\" -ot \"$packfile\"\n>>> +'\n>> \"Test\" primaries -nt/-ot are unfortunately excluded from POSIX.\n> \n> hrmph, and it even worked on solaris ksh.\n\nFYI, also works with dash, and there is a use of '-nt' in git-mergetool.sh\nwhich is not exercised by the test suite.\n\nMaybe I'll think about a perl version.\n\nAlso, do you have a url to your posix reference?\n\n-brandon\n"},{"id":"77293","messageId":"20080519210843.GA25293@sigill.intra.peff.net","threadId":"13560","inReplyTo":"E8K6ZsektNV-bzzpBDDSjLUNAu6_Tgxq9EV2896g2zCI6VyLsESxXw@cipher.nrlssc.navy.mil","subject":"Re: [PATCH] t7701-repack-unpack-unreachable.sh: check timestamp of unpacked objects","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-05-19T21:08:43Z","receivedAt":"2008-05-19T21:08:43Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, May 19, 2008 at 03:27:02PM -0500, Brandon Casey wrote:\n\n> Also, do you have a url to your posix reference?\n\nI generally use:\n\n  http://www.opengroup.org/onlinepubs/009695399/\n\nSpecifically:\n\n  http://www.opengroup.org/onlinepubs/009695399/utilities/test.html\n\n-Peff\n"},{"id":"77295","messageId":"muwFetVdZVj0u7hdn3wbFF5mvUXeSbjeC5MyMipJMopcTE4BPs_RBQ@cipher.nrlssc.navy.mil","threadId":"13560","inReplyTo":"20080519210843.GA25293@sigill.intra.peff.net","subject":"Re: [PATCH] t7701-repack-unpack-unreachable.sh: check timestamp of unpacked objects","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2008-05-19T21:48:48Z","receivedAt":"2008-05-19T21:48:48Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"Jeff King wrote:\n> On Mon, May 19, 2008 at 03:27:02PM -0500, Brandon Casey wrote:\n> \n>> Also, do you have a url to your posix reference?\n> \n> I generally use:\n> \n>   http://www.opengroup.org/onlinepubs/009695399/\n\nThat's what I was looking for (didn't look hard enough).\n\n> Specifically:\n> \n>   http://www.opengroup.org/onlinepubs/009695399/utilities/test.html\n\nThis should be more accurate than my old reference: 'man test' :)\n\nthanks,\n-brandon\n"}]}