{"thread":{"id":"48610","subject":"[PATCH] Announce: unset GIT_PAGER and add minimal usage in header","startedAt":"2018-05-30T23:27:59Z","lastAt":"2018-05-30T23:27:59Z","messageCount":1,"participants":["Stefan Beller"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"348855","messageId":"20180530232750.10432-1-sbeller@google.com","threadId":"48610","inReplyTo":null,"subject":"[PATCH] Announce: unset GIT_PAGER and add minimal usage in header","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2018-05-30T23:27:50Z","receivedAt":"2018-05-30T23:27:59Z","isPatch":true,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"When running the Announce script in a terminal, the git shortlog will\nopen a pager, which is confusing as it leads to omission of the rest\nof the message inside the pager. Do not page the output to avoid confusion.\n\nWhile at it, add a basic usage example to the header, which illustrates\nhow it is used. This might be useful, but the way branch and previous\nare set already help a lot.\n\nSigned-off-by: Stefan Beller <sbeller@google.com>\n---\n\nThis applies to the todo branch. Not sure if it is worth it, though.\n\nI played around with the Announce script after I realized that the\nannouncement emails are not checked in, but generated on the fly.\nThe reason I played around with the script is the two seemingly same\npoints\n\n>  * Rename detection logic in \"diff\" family that is used in \"merge\" has\n>    learned to guess when all of x/a, x/b and x/c have moved to z/a,\n>    z/b and z/c, it is likely that x/d added in the meantime would also\n>    want to move to z/d by taking the hint that the entire directory\n>    'x' moved to 'z'.  A bug causing dirty files involved in a rename\n>    to be overwritten during merge has also been fixed as part of this\n>    work. \n\nThe second time it appears, it also contains:\n\n>           Incidentally, this also avoids updating a file in the\n>    working tree after a (non-trivial) merge whose result matches what\n>    our side originally had.\n\nwhich made me wonder how this message comes to life. \n\nThanks,\nStefan\n\n Announce | 5 +++++\n 1 file changed, 5 insertions(+)\n\ndiff --git a/Announce b/Announce\nindex 91d0ba44cca..7c573e2fc40 100755\n--- a/Announce\n+++ b/Announce\n@@ -1,11 +1,16 @@\n #!/bin/sh\n # Announcement message skelton\n+# usage: Meta/Announce <version to announce> <diff-against>\n+# e.g. Meta/Announce v2.18.0-rc0 v2.17.0\n #\n+\n tmpbase=/var/tmp/git-announce.$$\n trap 'rm -f $tmpbase.*' 0\n branch=${1?branch}\n previous=${2?previous}\n commit=${3-\"$1\"}\n+GIT_PAGER=\n+export GIT_PAGER\n \n relname=$(git describe \"$commit\") &&\n vername=$(expr \"$relname\" : 'v\\(.*\\)') || exit $?\n-- \n2.17.0.582.gccdcbd54c44.dirty\n\n"}]}