{"thread":{"id":"28317","subject":"[PATCH] State what commit to expect in request-pull","startedAt":"2011-09-06T21:24:40Z","lastAt":"2011-09-06T21:58:27Z","messageCount":2,"participants":["Junio C Hamano","Shawn Pearce"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"174962","messageId":"7vwrdl749z.fsf@alter.siamese.dyndns.org","threadId":"28317","inReplyTo":null,"subject":"[PATCH] State what commit to expect in request-pull","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-09-06T21:24:40Z","receivedAt":"2011-09-06T21:24:40Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Interestingly, we did say what commit the requesters based their changes\non, but did not give the person who performs a fetch & merge to make sure\nhe fetched the right branch.\n\nThis fixes it.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n git-request-pull.sh     |    1 +\n t/t5150-request-pull.sh |    1 +\n 2 files changed, 2 insertions(+), 0 deletions(-)\n\ndiff --git a/git-request-pull.sh b/git-request-pull.sh\nindex fc080cc..9b06a87 100755\n--- a/git-request-pull.sh\n+++ b/git-request-pull.sh\n@@ -71,6 +71,7 @@ git show -s --format='The following changes since commit %H:\n \n are available in the git repository at:' $baserev &&\n echo \"  $url $branch\" &&\n+echo \"for you to fetch changes up to $headrev\"\n echo &&\n \n git shortlog ^$baserev $headrev &&\ndiff --git a/t/t5150-request-pull.sh b/t/t5150-request-pull.sh\nindex 9cc0a42..9d27c43 100755\n--- a/t/t5150-request-pull.sh\n+++ b/t/t5150-request-pull.sh\n@@ -194,6 +194,7 @@ test_expect_success 'pull request format' '\n \n \tare available in the git repository at:\n \t  URL BRANCH\n+\tfor you to fetch changes up to OBJECT_NAME\n \n \tSHORTLOG\n \n"},{"id":"174967","messageId":"CAJo=hJsHsVGm1xo4PP416Ek5M+3cc-VZ9LcDBhePNgahcjzB=A@mail.gmail.com","threadId":"28317","inReplyTo":"7vwrdl749z.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] State what commit to expect in request-pull","fromName":"Shawn Pearce","fromEmail":"spearce@spearce.org","sentAt":"2011-09-06T21:58:27Z","receivedAt":"2011-09-06T21:58:27Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"On Tue, Sep 6, 2011 at 14:24, Junio C Hamano <gitster@pobox.com> wrote:\n> Interestingly, we did say what commit the requesters based their changes\n> on, but did not give the person who performs a fetch & merge to make sure\n> he fetched the right branch.\n...\n> diff --git a/git-request-pull.sh b/git-request-pull.sh\n> @@ -71,6 +71,7 @@ git show -s --format='The following changes since commit %H:\n>\n>  are available in the git repository at:' $baserev &&\n>  echo \"  $url $branch\" &&\n> +echo \"for you to fetch changes up to $headrev\"\n>  echo &&\n\nBetter than what we had before. I was sort of hoping for changing the\npull line slightly to include the SHA-1. E.g. suppose instead the line\nwas:\n\n  echo \"  $url $headrev\"\n\nand git pull passed the $headrev down to git fetch, which then found\nany reference that points exactly at $headrev and fetches that. The\nbranch name is now lost for the merge summary, but could be guessed\nfrom the advertisement similar to how HEAD is guessed. Git pull could\nalso then validate that the commit its merging in FETCH_HEAD is what\nwas passed on the command line.\n\nThen verification of the SHA-1 is automatic by Git, and doesn't\nrequire a human. If the pull request was sent by GPG signed email, and\nthe MUA checked the signature, the puller has pretty reasonable\nassurance over the content they are bringing into their repository.\n\n-- \nShawn.\n"}]}