{"thread":{"id":"30996","subject":"Mini bug report origin/pu: t1512 failed on Mac OS X (commit 957d74062c1f0e ?)","startedAt":"2012-07-11T20:09:02Z","lastAt":"2012-07-13T23:31:29Z","messageCount":7,"participants":["Torsten Bögershausen","Junio C Hamano","Johannes Sixt","Stefano Lattarini"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"194930","messageId":"4FFDDD5E.3080309@web.de","threadId":"30996","inReplyTo":null,"subject":"Mini bug report origin/pu: t1512 failed on Mac OS X (commit 957d74062c1f0e ?)","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2012-07-11T20:09:02Z","receivedAt":"2012-07-11T20:09:02Z","isPatch":false,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"The following tweak will make t1512 work on my Mac OS box:\n\n\n--- a/t/t1512-rev-parse-disambiguation.sh\n+++ b/t/t1512-rev-parse-disambiguation.sh\n@@ -257,7 +257,7 @@ test_expect_success 'rev-parse --disambiguate' '\n        # commits created by commit-tree in earlier tests do not share\n        # the prefix.\n        git rev-parse --disambiguate=000000000 >actual &&\n-       test \"$(wc -l <actual)\" = 16 &&\n+       test \"$(wc -l <actual)\" -eq  16 &&\n        test \"$(sed -e \"s/^\\(.........\\).*/\\1/\" actual | sort -u)\" = 000000000\n\n\n\n/Torsten\n"},{"id":"194949","messageId":"7vipdtdhla.fsf@alter.siamese.dyndns.org","threadId":"30996","inReplyTo":"4FFDDD5E.3080309@web.de","subject":"Re: Mini bug report origin/pu: t1512 failed on Mac OS X (commit 957d74062c1f0e ?)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-07-11T23:05:21Z","receivedAt":"2012-07-11T23:05:21Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Torsten Bögershausen <tboegi@web.de> writes:\n\n> The following tweak will make t1512 work on my Mac OS box:\n>\n>\n> --- a/t/t1512-rev-parse-disambiguation.sh\n> +++ b/t/t1512-rev-parse-disambiguation.sh\n> @@ -257,7 +257,7 @@ test_expect_success 'rev-parse --disambiguate' '\n>         # commits created by commit-tree in earlier tests do not share\n>         # the prefix.\n>         git rev-parse --disambiguate=000000000 >actual &&\n> -       test \"$(wc -l <actual)\" = 16 &&\n> +       test \"$(wc -l <actual)\" -eq  16 &&\n\nI think the other tests in t/ prefer to unquote it so that we would\nignore spaces around \"wc -l\" output, i.e.\n\n\ttest $(wc -l <actual) = 16\n\nThanks for a report.\n"},{"id":"194950","messageId":"7va9z5dgff.fsf@alter.siamese.dyndns.org","threadId":"30996","inReplyTo":"7vipdtdhla.fsf@alter.siamese.dyndns.org","subject":"Re: Mini bug report origin/pu: t1512 failed on Mac OS X (commit 957d74062c1f0e ?)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-07-11T23:30:28Z","receivedAt":"2012-07-11T23:30:28Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> I think the other tests in t/ prefer to unquote it so that we would\n> ignore spaces around \"wc -l\" output, i.e.\n>\n> \ttest $(wc -l <actual) = 16\n>\n> Thanks for a report.\n\n-- >8 --\nSubject: [PATCH] t1512: ignore whitespaces in wc -l output\n\nSome implementations of sed (e.g. MacOS X) have whitespaces in the\noutput of \"wc -l\" that reads from the standard input.  Ignore these\nwhitespaces by not quoting the command substitution to be compared\nwith the constant \"16\".\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n t/t1512-rev-parse-disambiguation.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t1512-rev-parse-disambiguation.sh b/t/t1512-rev-parse-disambiguation.sh\nindex 3ed7558..1eb3514 100755\n--- a/t/t1512-rev-parse-disambiguation.sh\n+++ b/t/t1512-rev-parse-disambiguation.sh\n@@ -257,7 +257,7 @@ test_expect_success 'rev-parse --disambiguate' '\n \t# commits created by commit-tree in earlier tests do not share\n \t# the prefix.\n \tgit rev-parse --disambiguate=000000000 >actual &&\n-\ttest \"$(wc -l <actual)\" = 16 &&\n+\ttest $(wc -l <actual) = 16 &&\n \ttest \"$(sed -e \"s/^\\(.........\\).*/\\1/\" actual | sort -u)\" = 000000000\n '\n \n-- \n1.7.11.2.270.gc2d3e4b\n"},{"id":"194953","messageId":"4FFE7AEA.6060001@viscovery.net","threadId":"30996","inReplyTo":"7va9z5dgff.fsf@alter.siamese.dyndns.org","subject":"Re: Mini bug report origin/pu: t1512 failed on Mac OS X (commit 957d74062c1f0e ?)","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2012-07-12T07:21:14Z","receivedAt":"2012-07-12T07:21:14Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 7/12/2012 1:30, schrieb Junio C Hamano:\n> -\ttest \"$(wc -l <actual)\" = 16 &&\n> +\ttest $(wc -l <actual) = 16 &&\n\nWe have a helper function for this:\n\n\ttest_line_count = 16 actual &&\n\n-- Hannes\n"},{"id":"194969","messageId":"7vy5moc3w0.fsf@alter.siamese.dyndns.org","threadId":"30996","inReplyTo":"4FFE7AEA.6060001@viscovery.net","subject":"Re: Mini bug report origin/pu: t1512 failed on Mac OS X (commit 957d74062c1f0e ?)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-07-12T16:58:55Z","receivedAt":"2012-07-12T16:58:55Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Sixt <j.sixt@viscovery.net> writes:\n\n> Am 7/12/2012 1:30, schrieb Junio C Hamano:\n>> -\ttest \"$(wc -l <actual)\" = 16 &&\n>> +\ttest $(wc -l <actual) = 16 &&\n>\n> We have a helper function for this:\n>\n> \ttest_line_count = 16 actual &&\n\nOK.\n"},{"id":"195031","messageId":"5000A483.4090307@gmail.com","threadId":"30996","inReplyTo":"7va9z5dgff.fsf@alter.siamese.dyndns.org","subject":"Re: Mini bug report origin/pu: t1512 failed on Mac OS X (commit 957d74062c1f0e ?)","fromName":"Stefano Lattarini","fromEmail":"stefano.lattarini@gmail.com","sentAt":"2012-07-13T22:43:15Z","receivedAt":"2012-07-13T22:43:15Z","isPatch":false,"sender":{"key":"stefano.lattarini@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1429199?v=4"},"body":"On 07/12/2012 01:30 AM, Junio C Hamano wrote:\n> Junio C Hamano <gitster@pobox.com> writes:\n> \n>> I think the other tests in t/ prefer to unquote it so that we would\n>> ignore spaces around \"wc -l\" output, i.e.\n>>\n>> \ttest $(wc -l <actual) = 16\n>>\n>> Thanks for a report.\n> \n> -- >8 --\n> Subject: [PATCH] t1512: ignore whitespaces in wc -l output\n> \n> Some implementations of sed (e.g. MacOS X)\n>\n'sed'?  Shouldn't this read 'wc'?\n\n> have whitespaces in the output of \"wc -l\" that reads from the standard\n> input.\n>\nFYI, the extra space is present with Solaris wc as well:\n\n$ wc -l </dev/null\n       0\n\nRegards,\n  Stefano\n"},{"id":"195033","messageId":"7vk3y76xwu.fsf@alter.siamese.dyndns.org","threadId":"30996","inReplyTo":"5000A483.4090307@gmail.com","subject":"Re: Mini bug report origin/pu: t1512 failed on Mac OS X (commit 957d74062c1f0e ?)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-07-13T23:31:29Z","receivedAt":"2012-07-13T23:31:29Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Stefano Lattarini <stefano.lattarini@gmail.com> writes:\n\n> On 07/12/2012 01:30 AM, Junio C Hamano wrote:\n>> Junio C Hamano <gitster@pobox.com> writes:\n>> \n>>> I think the other tests in t/ prefer to unquote it so that we would\n>>> ignore spaces around \"wc -l\" output, i.e.\n>>>\n>>> \ttest $(wc -l <actual) = 16\n>>>\n>>> Thanks for a report.\n>> \n>> -- >8 --\n>> Subject: [PATCH] t1512: ignore whitespaces in wc -l output\n>> \n>> Some implementations of sed (e.g. MacOS X)\n>>\n> 'sed'?  Shouldn't this read 'wc'?\n\nHeh, funny typo.  I don't know what I was thinking.\n"}]}