{"thread":{"id":"24936","subject":"[PATCH] install-webdoc: quell diff output on stdout","startedAt":"2010-09-01T15:10:21Z","lastAt":"2010-09-06T13:24:03Z","messageCount":7,"participants":["Michael J Gruber","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"149564","messageId":"2730e927194a15f708ea4c5ffa72353f793f2ed4.1283353628.git.git@drmicha.warpmail.net","threadId":"24936","inReplyTo":null,"subject":"[PATCH] install-webdoc: quell diff output on stdout","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2010-09-01T15:10:21Z","receivedAt":"2010-09-01T15:10:21Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"When installing html-doc, install-webdoc.sh compares the installed html\nwith the version to be installed using diff. Currently, the diff output\nfills up stdout.\n\nRedirect this to /dev/null so that the actual progress report can be\nspotted again. (Note that install-webdoc.sh actually uses $DIFF so that\nredirecting stdout is safer than using an option which $DIFF may or may\nnot understand.)\n\nSigned-off-by: Michael J Gruber <git@drmicha.warpmail.net>\n---\n Documentation/install-webdoc.sh |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/Documentation/install-webdoc.sh b/Documentation/install-webdoc.sh\nindex 34d02a2..43c09d2 100755\n--- a/Documentation/install-webdoc.sh\n+++ b/Documentation/install-webdoc.sh\n@@ -12,7 +12,7 @@ do\n \tthen\n \t\t: did not match\n \telif test -f \"$T/$h\" &&\n-\t   $DIFF -u -I'Last updated [0-9][0-9]-[A-Z][a-z][a-z]-' \"$T/$h\" \"$h\"\n+\t   $DIFF -u -I'Last updated [0-9][0-9]-[A-Z][a-z][a-z]-' \"$T/$h\" \"$h\" >/dev/null\n \tthen\n \t\t:; # up to date\n \telse\n-- \n1.7.2.2.540.g9d56f.dirty\n"},{"id":"149572","messageId":"7vzkw15t50.fsf@alter.siamese.dyndns.org","threadId":"24936","inReplyTo":"2730e927194a15f708ea4c5ffa72353f793f2ed4.1283353628.git.git@drmicha.warpmail.net","subject":"Re: [PATCH] install-webdoc: quell diff output on stdout","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-09-01T16:24:27Z","receivedAt":"2010-09-01T16:24:27Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Michael J Gruber <git@drmicha.warpmail.net> writes:\n\n> When installing html-doc, install-webdoc.sh compares the installed html\n> with the version to be installed using diff. Currently, the diff output\n> fills up stdout.\n\nAs I've been using this output as the final sanity check on k.org\nenvironment, I personally do not want to lose the output from that\nparticular diff.\n\nWhen I push to the public repository, a hook is triggered to build and\ninstall the documentation, sending its progress to a log file, and I have\na window open running \"tail -f\" on it.\n\nActually why don't we do the attached instead as the first step?\n\nThe timestamp that follows \"Last updated \" is formatted differently\ndepending on the version of AsciiDoc.  Looking at 4604fe56 on \"html\"\nbranch, you can see that AsciiDoc 7.0.2 used to give \"02-Jul-2008 03:02:14\nUTC\" but AsciiDoc 8.2.5 gave \"2008-09-19 06:33:25 UTC\".  We haven't been\ncorrectly filtering out phantom changes that result from only the build\ndate for some time now, it seems.\n\n    Side note:\n\n    How can you find the above easily?  Here is one way, if you run git\n    with f506b8e (git log/diff: add -G<regexp> that greps in the patch\n    text, 2010-08-23) currently parked in 'pu':\n\n\tgit log -p -G\"Last updated [0-9][0-9]-[A-Z][a-z][a-z]-\" origin/html\n\n Documentation/install-webdoc.sh |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/Documentation/install-webdoc.sh b/Documentation/install-webdoc.sh\nindex 34d02a2..37e67d1 100755\n--- a/Documentation/install-webdoc.sh\n+++ b/Documentation/install-webdoc.sh\n@@ -12,7 +12,7 @@ do\n \tthen\n \t\t: did not match\n \telif test -f \"$T/$h\" &&\n-\t   $DIFF -u -I'Last updated [0-9][0-9]-[A-Z][a-z][a-z]-' \"$T/$h\" \"$h\"\n+\t\t$DIFF -u -I'^Last updated ' \"$T/$h\" \"$h\"\n \tthen\n \t\t:; # up to date\n \telse\n"},{"id":"149622","messageId":"4C7F5267.5030708@drmicha.warpmail.net","threadId":"24936","inReplyTo":"7vzkw15t50.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] install-webdoc: quell diff output on stdout","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2010-09-02T07:29:43Z","receivedAt":"2010-09-02T07:29:43Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Junio C Hamano venit, vidit, dixit 01.09.2010 18:24:\n> Michael J Gruber <git@drmicha.warpmail.net> writes:\n> \n>> When installing html-doc, install-webdoc.sh compares the installed html\n>> with the version to be installed using diff. Currently, the diff output\n>> fills up stdout.\n> \n> As I've been using this output as the final sanity check on k.org\n> environment, I personally do not want to lose the output from that\n> particular diff.\n> \n> When I push to the public repository, a hook is triggered to build and\n> install the documentation, sending its progress to a log file, and I have\n> a window open running \"tail -f\" on it.\n\nSorry, isn't that a somewhat crazy type of sanity check? You're getting\nthe complete diff for the generated htmls flying by. Wouldn't the actual\n\"install...\" be sufficient, or maybe, a QUIET_DIFF variant which\ndisplays the command line? And not only sufficient, but actually easier\nto check visually as you seem to do?\n\n[A more throrough check would be comparing the name-diff of\nDocumentation/*.txt with that of the generated html.]\n\n> \n> Actually why don't we do the attached instead as the first step?\n> \n> The timestamp that follows \"Last updated \" is formatted differently\n> depending on the version of AsciiDoc.  Looking at 4604fe56 on \"html\"\n> branch, you can see that AsciiDoc 7.0.2 used to give \"02-Jul-2008 03:02:14\n> UTC\" but AsciiDoc 8.2.5 gave \"2008-09-19 06:33:25 UTC\".  We haven't been\n> correctly filtering out phantom changes that result from only the build\n> date for some time now, it seems.\n> \n>     Side note:\n> \n>     How can you find the above easily?  Here is one way, if you run git\n>     with f506b8e (git log/diff: add -G<regexp> that greps in the patch\n>     text, 2010-08-23) currently parked in 'pu':\n> \n> \tgit log -p -G\"Last updated [0-9][0-9]-[A-Z][a-z][a-z]-\" origin/html\n> \n>  Documentation/install-webdoc.sh |    2 +-\n>  1 files changed, 1 insertions(+), 1 deletions(-)\n> \n> diff --git a/Documentation/install-webdoc.sh b/Documentation/install-webdoc.sh\n> index 34d02a2..37e67d1 100755\n> --- a/Documentation/install-webdoc.sh\n> +++ b/Documentation/install-webdoc.sh\n> @@ -12,7 +12,7 @@ do\n>  \tthen\n>  \t\t: did not match\n>  \telif test -f \"$T/$h\" &&\n> -\t   $DIFF -u -I'Last updated [0-9][0-9]-[A-Z][a-z][a-z]-' \"$T/$h\" \"$h\"\n> +\t\t$DIFF -u -I'^Last updated ' \"$T/$h\" \"$h\"\n>  \tthen\n>  \t\t:; # up to date\n>  \telse\n\nI think that is the right fix for the problem you mentioned, which is a\ndifferent one ;)\n\nWith your fix, the problem I'm after occurs less often, of course, maybe\nto the extent of not being a real problem any more.\n\nMichael\n"},{"id":"149645","messageId":"7vhbi842gx.fsf@alter.siamese.dyndns.org","threadId":"24936","inReplyTo":"4C7F5267.5030708@drmicha.warpmail.net","subject":"Re: [PATCH] install-webdoc: quell diff output on stdout","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-09-02T14:58:06Z","receivedAt":"2010-09-02T14:58:06Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Michael J Gruber <git@drmicha.warpmail.net> writes:\n\n> Junio C Hamano venit, vidit, dixit 01.09.2010 18:24:\n> ...\n>> When I push to the public repository, a hook is triggered to build and\n>> install the documentation, sending its progress to a log file, and I have\n>> a window open running \"tail -f\" on it.\n>\n> Sorry, isn't that a somewhat crazy type of sanity check? You're getting\n> the complete diff for the generated htmls flying by. Wouldn't the actual\n> \"install...\" be sufficient, or maybe, a QUIET_DIFF variant which\n> displays the command line? And not only sufficient, but actually easier\n> to check visually as you seem to do?\n\nI use the diff to see what text actually changed, so the answer is no.\n\nBut I am file with a patch to squelch the output by default, while giving\nme an option (perhaps by setting an environment variable when the hook\ntriggers the build and install of the documentation) to unsquelch.\n"},{"id":"150045","messageId":"52f347f82734e5d75d0b93a67edca9941efaa5a9.1283612149.git.git@drmicha.warpmail.net","threadId":"24936","inReplyTo":"7vhbi842gx.fsf@alter.siamese.dyndns.org","subject":"[PATCHv2] install-webdoc: quell diff output on stdout","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2010-09-06T06:18:39Z","receivedAt":"2010-09-06T06:18:39Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"When installing html-doc, install-webdoc.sh compares the installed html\nwith the version to be installed using diff. Currently, the diff output\nfills up stdout.\n\ninstall-webdoc.sh actually uses $DIFF, and is the only user. Redefine\nDIFF from \"diff\" to \"diff -q\" to quell the output which is a more useful\ngeneral default and in line with the default \"QUIET\" make rules.\n\nThis can be easily overriden by prefixing make with \"DIFF=diff\" or\nputting this in config.mak.\n\nSigned-off-by: Michael J Gruber <git@drmicha.warpmail.net>\n---\n Makefile |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 38a8b65..b5d9c51 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -301,7 +301,7 @@ export prefix bindir sharedir sysconfdir gitwebdir\n CC = gcc\n AR = ar\n RM = rm -f\n-DIFF = diff\n+DIFF ?= diff -q\n TAR = tar\n FIND = find\n INSTALL = install\n-- \n1.7.2.2.540.g9d56f.dirty\n"},{"id":"150051","messageId":"7v7hizuz7h.fsf@alter.siamese.dyndns.org","threadId":"24936","inReplyTo":"52f347f82734e5d75d0b93a67edca9941efaa5a9.1283612149.git.git@drmicha.warpmail.net","subject":"Re: [PATCHv2] install-webdoc: quell diff output on stdout","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-09-06T07:07:46Z","receivedAt":"2010-09-06T07:07:46Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Michael J Gruber <git@drmicha.warpmail.net> writes:\n\n> When installing html-doc, install-webdoc.sh compares the installed html\n> with the version to be installed using diff. Currently, the diff output\n> fills up stdout.\n>\n> install-webdoc.sh actually uses $DIFF, and is the only user.\n\nI think you broke \"tNNNN-X.sh -v\"; isn't $DIFF used in t/ scripts\neverywhere?\n\nEven if install-webdoc.sh were the sole user (which is not), please don't\ndo it this way.  Instead, introduce \"SHOW_PATCH_WHILE_INSTALLING_WEBDOC\"\nor something, and run \"$DIFF\" with \"-q\" when it is not set.\n\nOtherwise you would forbid people from using $DIFF for its intended\npurpose: name a diff binary that can be used that is different from a\ncrappy diff your platform gives you by default.\n"},{"id":"150081","messageId":"4C84EB73.4040901@drmicha.warpmail.net","threadId":"24936","inReplyTo":"7v7hizuz7h.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCHv2] install-webdoc: quell diff output on stdout","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2010-09-06T13:24:03Z","receivedAt":"2010-09-06T13:24:03Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Junio C Hamano venit, vidit, dixit 06.09.2010 09:07:\n> Michael J Gruber <git@drmicha.warpmail.net> writes:\n> \n>> When installing html-doc, install-webdoc.sh compares the installed html\n>> with the version to be installed using diff. Currently, the diff output\n>> fills up stdout.\n>>\n>> install-webdoc.sh actually uses $DIFF, and is the only user.\n> \n> I think you broke \"tNNNN-X.sh -v\"; isn't $DIFF used in t/ scripts\n> everywhere?\n\nUm, OK, sorry. I grepped for it but not everywhere it seems. I'll be\npartially online only this week but I'll try to come up with something\nagreeable.\n\nMichael\n"}]}