From: Junio C Hamano Date: Tue, 13 Sep 2011 22:28:16 GMT Subject: [PATCH v2 2/2] request-pull: state exact commit object name Message-ID: <1315952896-17258-3-git-send-email-gitster@pobox.com> In-Reply-To: <1315952896-17258-1-git-send-email-gitster@pobox.com> A typical pull-request begins like this: The following changes since commit f696543dad6c7ba27b0c4fab167a5687263a9ba0: Flobar 2.4.3 (2011-09-13 12:34:56 +0900) are available in the git repository at: git://git.kernel.org/pub/flobar.git/ master which is followed by the shortlog and expected diffstat. This tells you where the requester based his work on in excruciating detail, but does not tell you what you should expect to fetch, any more than "whatever happened to be at the named branch when you happened to notice the request." Update the message slightly to say: git://git.kernel.org/pub/flobar.git/ 5738c9c21e53356ab5020912116e7f82fd2d428f ;# master so that the line still can be cut&pasted after "git fetch" (or "git pull"), to form a command line that looks like: $ git ;# branch Signed-off-by: Junio C Hamano --- git-request-pull.sh | 2 +- t/t5150-request-pull.sh | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/git-request-pull.sh b/git-request-pull.sh index fc080cc..b5a2d0f 100755 --- a/git-request-pull.sh +++ b/git-request-pull.sh @@ -70,7 +70,7 @@ git show -s --format='The following changes since commit %H: %s (%ci) are available in the git repository at:' $baserev && -echo " $url $branch" && +echo " $url $headrev ;# $branch" && echo && git shortlog ^$baserev $headrev && diff --git a/t/t5150-request-pull.sh b/t/t5150-request-pull.sh index 9cc0a42..e9d657e 100755 --- a/t/t5150-request-pull.sh +++ b/t/t5150-request-pull.sh @@ -70,9 +70,10 @@ test_expect_success 'setup: two scripts for reading pull requests' ' / in the git repository at:$/!d n /^$/ n - s/^[ ]*\(.*\) \([^ ]*\)/please pull\ + s/^[ ]*\(.*\) \([^ ]*\) ;# \([^ ]*\)/please pull\ \1\ - \2/p + \2\ + \3/p q EOT @@ -145,6 +146,7 @@ test_expect_success 'pull request after push' ' { read task && read repository && + read head && read branch } ../request ) && sed -nf read-request.sed digest && - cat digest && { read task && read repository && + read head && read branch }