All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Tejun Heo <tj@kernel.org>, Git Mailing List <git@vger.kernel.org>,
	Jeff King <peff@peff.net>
Subject: Re* [RFC PATCH 2/1] Make request-pull able to take a refspec of form local:remote
Date: Wed, 29 Jan 2014 15:34:32 -0800	[thread overview]
Message-ID: <xmqqfvo6icqf.fsf_-_@gitster.dls.corp.google.com> (raw)
In-Reply-To: <xmqqvbx9qgo7.fsf@gitster.dls.corp.google.com> (Junio C. Hamano's message of "Fri, 24 Jan 2014 12:16:24 -0800")

Junio C Hamano <gitster@pobox.com> writes:

> So there are two remaining items, I think.
>
>  - After creating a tags/for-linus signed tag and pushing it to
>    tags/for-linus, asking request-pull to request that tag to be
>    pulled seems to lose the tag message from the output.
>
>  - Docs.
>
> [Footnote]
>
> *1* Not that it is always acceptable to break the existing users as
>     long as they are clueful ones and they are given an escape hatch.
>     But this time I know I won't be in the middle of firestorm like
>     the one we had immediately after 1.6.0, as long as I keep the
>     URL of the message I am responding to in the list archive ;-)

I am not yet doing the docs, but here is a minimal (and I think is
the most sensible) fix to the "If I asked a tag to be pulled, I used
to get the message from the tag in the output---the updated code no
longer does so" problem.

With this fix, the updates to t5150 I queued on top of the two
patches can lose a "test_expect_failure".

I would not be surprised if there are other regressions, though
[*1*].  I am worried about regressions when the user explicitly asks
a ref to be pulled---e.g the command refuses to produce output and
instead fails (perhaps because the ambiguity check is overly
stricter than it should be), or the command produces output that is
different from what we used to produce (this patch is a fix to the
problem in that latter category, but there may be other differences
the existing tests are not covering).

[Footnote]

*1* No, I do not count "I used to be able to ask 'master' (or
implicitly 'HEAD' that I happen to be sitting on) to be pulled and
rely on that the command figures out that I have that commit on
'for-linus' in my publish repository, but that feature was removed"
as a regression.  Removing that cleverness is the point of this
series.

-- >8 --
Subject: [PATCH] request-pull: pick up tag message as before

The previous two steps were meant to stop promoting the explicit
refname the user gave to the command to a different ref that points
at it.  Most notably, we no longer substitute a branch name the user
used with a name of the tqag that points at the commit at the tip of
the branch.

However, they also lost the code that included the message in a
tag when the user _did_ ask the tag to be pulled.  Resurrect it.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 git-request-pull.sh | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/git-request-pull.sh b/git-request-pull.sh
index c8ab0e9..93b4135 100755
--- a/git-request-pull.sh
+++ b/git-request-pull.sh
@@ -132,6 +132,14 @@ for you to fetch changes up to %H:
 
 ----------------------------------------------------------------' $headrev &&
 
+if test $(git cat-file -t "$head") = tag
+then
+	git cat-file tag "$head" |
+	sed -n -e '1,/^$/d' -e '/^-----BEGIN PGP /q' -e p
+	echo
+	echo "----------------------------------------------------------------"
+fi &&
+
 if test -n "$branch_name"
 then
 	echo "(from the branch description for $branch_name local branch)"
-- 
1.9-rc1-183-g614c158

  reply	other threads:[~2014-01-29 23:34 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-23  0:06 [RFC PATCH 2/1] Make request-pull able to take a refspec of form local:remote Linus Torvalds
2014-01-23 19:43 ` Junio C Hamano
2014-01-23 19:57   ` Linus Torvalds
2014-01-23 22:58     ` Junio C Hamano
2014-01-23 23:56       ` Linus Torvalds
2014-01-24 20:16         ` Junio C Hamano
2014-01-29 23:34           ` Junio C Hamano [this message]
2014-01-30  0:16             ` Re* " brian m. carlson
2014-01-30  0:40             ` Linus Torvalds
2014-02-25 21:44               ` Junio C Hamano
2014-03-12 18:04                 ` Junio C Hamano
2014-03-12 23:18                   ` Eric Sunshine
2014-03-13 21:22                     ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqfvo6icqf.fsf_-_@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=tj@kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.