{"thread":{"id":"9694","subject":"[PATCH] t5701: \"wc -l\" may add whitespace","startedAt":"2007-08-29T16:52:45Z","lastAt":"2007-08-30T09:26:48Z","messageCount":5,"participants":["Johannes Schindelin","Matthieu Moy","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"51836","messageId":"Pine.LNX.4.64.0708291752050.28586@racer.site","threadId":"9694","inReplyTo":null,"subject":"[PATCH] t5701: \"wc -l\" may add whitespace","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-08-29T16:52:45Z","receivedAt":"2007-08-29T16:52:45Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n\n\tFound in msysGit... MSys' wc seems to suffer the same defect that \n\tOSX' wc has...\n\n t/t5701-clone-local.sh |    6 ++----\n 1 files changed, 2 insertions(+), 4 deletions(-)\n\ndiff --git a/t/t5701-clone-local.sh b/t/t5701-clone-local.sh\nindex d2f55eb..7e7019f 100755\n--- a/t/t5701-clone-local.sh\n+++ b/t/t5701-clone-local.sh\n@@ -54,8 +54,7 @@ test_expect_success 'With -no-hardlinks, local will make a copy' '\n \tcd \"$D\" &&\n \tgit clone --bare --no-hardlinks x w &&\n \tcd w &&\n-\tlinked=$(find objects -type f ! -links 1 | wc -l) &&\n-\ttest \"$linked\" = 0\n+\ttest $(find objects -type f ! -links 1 | wc -l) = 0\n '\n \n test_expect_success 'Even without -l, local will make a hardlink' '\n@@ -63,8 +62,7 @@ test_expect_success 'Even without -l, local will make a hardlink' '\n \trm -fr w &&\n \tgit clone -l --bare x w &&\n \tcd w &&\n-\tcopied=$(find objects -type f -links 1 | wc -l) &&\n-\ttest \"$copied\" = 0\n+\ttest $(find objects -type f -links 1 | wc -l) = 0\n '\n \n test_done\n-- \n1.5.3.rc7.2.g2d7f\n"},{"id":"51837","messageId":"vpqbqcqi8km.fsf@bauges.imag.fr","threadId":"9694","inReplyTo":"Pine.LNX.4.64.0708291752050.28586@racer.site","subject":"Re: [PATCH] t5701: \"wc -l\" may add whitespace","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2007-08-29T16:55:53Z","receivedAt":"2007-08-29T16:55:53Z","isPatch":true,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> -\tlinked=$(find objects -type f ! -links 1 | wc -l) &&\n> -\ttest \"$linked\" = 0\n> +\ttest $(find objects -type f ! -links 1 | wc -l) = 0\n\nYou can also use \"test x -eq y\" to compare integers.\n\nI don't know which one is the most portable.\n\n-- \nMatthieu\n"},{"id":"51838","messageId":"Pine.LNX.4.64.0708291759270.28586@racer.site","threadId":"9694","inReplyTo":"vpqbqcqi8km.fsf@bauges.imag.fr","subject":"Re: [PATCH] t5701: \"wc -l\" may add whitespace","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-08-29T17:00:58Z","receivedAt":"2007-08-29T17:00:58Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 29 Aug 2007, Matthieu Moy wrote:\n\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n> \n> > -\tlinked=$(find objects -type f ! -links 1 | wc -l) &&\n> > -\ttest \"$linked\" = 0\n> > +\ttest $(find objects -type f ! -links 1 | wc -l) = 0\n> \n> You can also use \"test x -eq y\" to compare integers.\n> \n> I don't know which one is the most portable.\n\nWho cares when my version is obviously portable?\n\nCiao,\nDscho\n"},{"id":"51873","messageId":"7vbqcpa6t6.fsf@gitster.siamese.dyndns.org","threadId":"9694","inReplyTo":"Pine.LNX.4.64.0708291752050.28586@racer.site","subject":"Re: [PATCH] t5701: \"wc -l\" may add whitespace","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-08-30T06:13:25Z","receivedAt":"2007-08-30T06:13:25Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Isn't this already in as 70f64148bf7ca5136f2aa18c41b3b8f4bebfd138\n(Fix t5701-clone-local for white space from wc)?\n"},{"id":"51886","messageId":"Pine.LNX.4.64.0708301026060.28586@racer.site","threadId":"9694","inReplyTo":"7vbqcpa6t6.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] t5701: \"wc -l\" may add whitespace","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-08-30T09:26:48Z","receivedAt":"2007-08-30T09:26:48Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 29 Aug 2007, Junio C Hamano wrote:\n\n> Isn't this already in as 70f64148bf7ca5136f2aa18c41b3b8f4bebfd138\n> (Fix t5701-clone-local for white space from wc)?\n\nArgh.  I get confused with those new-workdirs.  (And it was necessary \nfor 4msysgit, which lags behind again...)  Sorry for the noise.\n\nCiao,\nDscho\n"}]}