{"thread":{"id":"22430","subject":"[PATCH] request-pull: avoid mentioning that the start point is a single commit","startedAt":"2010-01-29T01:18:17Z","lastAt":"2010-01-29T14:17:59Z","messageCount":4,"participants":["Miklos Vajna","Shawn O. Pearce","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"132928","messageId":"20100129011817.GT12429@genesis.frugalware.org","threadId":"22430","inReplyTo":null,"subject":"[PATCH] request-pull: avoid mentioning that the start point is a single commit","fromName":"Miklos Vajna","fromEmail":"vmiklos@frugalware.org","sentAt":"2010-01-29T01:18:17Z","receivedAt":"2010-01-29T01:18:17Z","isPatch":true,"sender":{"key":"vmiklos@frugalware.org","avatar":"https://gravatar.com/avatar/401c1cbbb3a5d13e650c691a2c71d6fd0b80df1a01bc74d9f1972675dd58f2bd?d=mp&s=160"},"body":"Previously we ran shortlog on the start commit which always printed\n\"(1)\" after the start commit, which gives no information, but makes the\noutput less easy to read. Avoid doing so.\n\nSigned-off-by: Miklos Vajna <vmiklos@frugalware.org>\n---\n\nSo for example the 'git request-pull master~2 . master' output diff is\nthe following here:\n\n\t The following changes since commit 68186857a9bb0a71e9456155623e02d398a5b817:\n\t-  Junio C Hamano (1):\n\t-        Merge branch 'il/maint-colon-address'\n\t+  Junio C Hamano: Merge branch 'il/maint-colon-address'\n\n\t are available in the git repository at:\n\n git-request-pull.sh |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/git-request-pull.sh b/git-request-pull.sh\nindex 630cedd..8475919 100755\n--- a/git-request-pull.sh\n+++ b/git-request-pull.sh\n@@ -66,7 +66,7 @@ if [ -z \"$branch\" ]; then\n fi\n \n echo \"The following changes since commit $baserev:\"\n-git shortlog --max-count=1 $baserev | sed -e 's/^\\(.\\)/  \\1/'\n+git log --max-count=1 --pretty=format:\"  %an: %s%n%n\" $baserev\n \n echo \"are available in the git repository at:\"\n echo\n-- \n1.6.6.1\n"},{"id":"132929","messageId":"20100129011938.GC20488@spearce.org","threadId":"22430","inReplyTo":"20100129011817.GT12429@genesis.frugalware.org","subject":"Re: [PATCH] request-pull: avoid mentioning that the start point is a single commit","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2010-01-29T01:19:38Z","receivedAt":"2010-01-29T01:19:38Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Miklos Vajna <vmiklos@frugalware.org> wrote:\n> Previously we ran shortlog on the start commit which always printed\n> \"(1)\" after the start commit, which gives no information, but makes the\n> output less easy to read. Avoid doing so.\n> \n> Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>\n> ---\n\nAcked-by: Shawn O. Pearce <spearce@spearce.org>\n\nNice fix, that was annoying me too, but I didn't care enough to\nwrite a patch.  :-)\n \n\n> -git shortlog --max-count=1 $baserev | sed -e 's/^\\(.\\)/  \\1/'\n> +git log --max-count=1 --pretty=format:\"  %an: %s%n%n\" $baserev\n\n-- \nShawn.\n"},{"id":"132940","messageId":"7vfx5pjrgm.fsf@alter.siamese.dyndns.org","threadId":"22430","inReplyTo":"20100129011817.GT12429@genesis.frugalware.org","subject":"Re: [PATCH] request-pull: avoid mentioning that the start point is a single commit","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-01-29T07:33:13Z","receivedAt":"2010-01-29T07:33:13Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Miklos Vajna <vmiklos@frugalware.org> writes:\n\n> Previously we ran shortlog on the start commit which always printed\n> \"(1)\" after the start commit, which gives no information, but makes the\n> output less easy to read. Avoid doing so.\n>\n> Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>\n> ---\n>\n> So for example the 'git request-pull master~2 . master' output diff is\n> the following here:\n>\n> \t The following changes since commit 68186857a9bb0a71e9456155623e02d398a5b817:\n> \t-  Junio C Hamano (1):\n> \t-        Merge branch 'il/maint-colon-address'\n> \t+  Junio C Hamano: Merge branch 'il/maint-colon-address'\n>\n> \t are available in the git repository at:\n>\n>  git-request-pull.sh |    2 +-\n>  1 files changed, 1 insertions(+), 1 deletions(-)\n>\n> diff --git a/git-request-pull.sh b/git-request-pull.sh\n> index 630cedd..8475919 100755\n> --- a/git-request-pull.sh\n> +++ b/git-request-pull.sh\n> @@ -66,7 +66,7 @@ if [ -z \"$branch\" ]; then\n>  fi\n>  \n>  echo \"The following changes since commit $baserev:\"\n> -git shortlog --max-count=1 $baserev | sed -e 's/^\\(.\\)/  \\1/'\n> +git log --max-count=1 --pretty=format:\"  %an: %s%n%n\" $baserev\n\nA few comments:\n\n - Modernising implementation by using tools different from what the\n   original used (i.e. shortlog -> log) is fine, but I'd recommend doing\n   so even more thoroughly.  Use \"show -s\" instead of \"log -1\" and\n   \"--format=\" instead of \"--pretty=format:\", for example.\n\n - If the stated goal of the change is to remove \" (1)\" which is\n   distracting with no useful information, remove that and only that,\n   without changing anything else in the output.\n\n - On the other hand, if you find that \"AuthorName: \" part is less useful\n   in identifying the commit than its title to help the requestee, change\n   the whole thing to make it even more useful.\n\nSo I'd suggest either:\n\n\tgit show -s --format=\"  %an:%n        %s\" $baserev\n\nto be conservative, or\n\n\tgit show -s --format=\"  %s (%an)\" $baserev\n\nor even to this:\n\n\tgit show -s --format=\"  %s (%ci)\" $baserev\n\nI suspect that the last one would be the easiest for the requestee to\njudge the freshness of the branch.\n\nWhy isn't the \"The following changes...\" line not part of the --format\nthing, by the way?  From the POV of readability of the code (not\nnecessarily the output), doing it this way might be the cleanest:\n\n-- >8 --\ngit show -s --format='The following changes since %H\n\n    %s (%ci)\n\nare available in the git repository at:' $baserev\necho \"  $url $branch\"\n-- 8< --\n"},{"id":"132957","messageId":"20100129141759.GY12429@genesis.frugalware.org","threadId":"22430","inReplyTo":"7vfx5pjrgm.fsf@alter.siamese.dyndns.org","subject":"[PATCH v2] request-pull: avoid mentioning that the start point is a single commit","fromName":"Miklos Vajna","fromEmail":"vmiklos@frugalware.org","sentAt":"2010-01-29T14:17:59Z","receivedAt":"2010-01-29T14:17:59Z","isPatch":true,"sender":{"key":"vmiklos@frugalware.org","avatar":"https://gravatar.com/avatar/401c1cbbb3a5d13e650c691a2c71d6fd0b80df1a01bc74d9f1972675dd58f2bd?d=mp&s=160"},"body":"Previously we ran shortlog on the start commit which always printed\n\"(1)\" after the start commit, which gives no information, but makes the\noutput less easy to read. Avoid doing so.\n\nSigned-off-by: Miklos Vajna <vmiklos@frugalware.org>\n---\n\nOn Thu, Jan 28, 2010 at 11:33:13PM -0800, Junio C Hamano <gitster@pobox.com> wrote:\n> I suspect that the last one would be the easiest for the requestee to\n> judge the freshness of the branch.\n>\n> Why isn't the \"The following changes...\" line not part of the --format\n> thing, by the way?\n\nOK, I changed it accordingly, though I did not the change the output of\nthe \"commit <hash>\" line. So the output diff is:\n\n         The following changes since commit 103209c6782586d92b04ee1fc71c0fd6f6385f5f:\n        -  Junio C Hamano (1):\n        -        Merge branch 'jc/maint-reflog-bad-timestamp'\n        +\n        +  Merge branch 'jc/maint-reflog-bad-timestamp' (2010-01-27 14:57:37 -0800)\n\n         are available in the git repository at:\n\n git-request-pull.sh |    8 ++++----\n 1 files changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/git-request-pull.sh b/git-request-pull.sh\nindex 630cedd..8fd15f6 100755\n--- a/git-request-pull.sh\n+++ b/git-request-pull.sh\n@@ -65,11 +65,11 @@ if [ -z \"$branch\" ]; then\n \tstatus=1\n fi\n \n-echo \"The following changes since commit $baserev:\"\n-git shortlog --max-count=1 $baserev | sed -e 's/^\\(.\\)/  \\1/'\n+git show -s --format='The following changes since commit %H:\n \n-echo \"are available in the git repository at:\"\n-echo\n+  %s (%ci)\n+\n+are available in the git repository at:' $baserev\n echo \"  $url $branch\"\n echo\n \n-- \n1.6.6.1\n"}]}