git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: John Wiegley <johnw@boostpro.com>
Cc: git@vger.kernel.org
Subject: Re: Using Origin hashes to improve rebase behavior
Date: Thu, 10 Feb 2011 23:45:40 -0500	[thread overview]
Message-ID: <20110211044539.GA2071@sigill.intra.peff.net> (raw)
In-Reply-To: <m2oc6jtg8o.fsf@hermes.luannocracy.com>

On Thu, Feb 10, 2011 at 10:14:15PM -0500, John Wiegley wrote:

> > And there are lots of other cases. What about "git cherry-pick -n"? What
> > about rebasing? If there are no conflicts, is it OK to copy the origin
> > field? How about if there are conflicts? How about in a "git rebase -i",
> > where we may stop and the user can arbitrarily split, amend, or add new
> > commits. How do the old commits map to the new ones with respect to
> > origin fields?
> 
> During rebasing, any commits which can be rebased without conflict have their
> origin transferred (and each time it would cause the origin id list to grow by
> one), but any commits which are squashed or edited would not transfer.

OK. That's certainly the conservative answer, and where we should start.
But I wonder in practice how many times we'll hit all the criteria just
right for this feature to kick in (i.e., a cherry pick or rebase with no
conflicts, followed by one that would cause a conflict). But I think
there's nothing to do but implement and see how it works.

After thinking about this a bit more, the whole idea of "is this
cherry-picked/rebased/whatever commit the same as the one before" is
really the same as the notes-rewriting case (i.e., copying notes on
commit A when it is rebased into A'). Which makes me excited about using
notes for this, because the rules that you do figure out to work in
practice will be good rules for notes rewriting in general.

> The problem with an external annotation is that if developers are sharing
> feature branches, as a branch maintainer I want to know whether commits coming
> from those feature branches are already in the branch I'm maintaining.

In that case, I would suggest putting it in git-notes and sharing the
notes with each other. The notes code should happily merge them all
together, and then everyone gets to see everybody else's
cherry-pick/rebase annotations.

-Peff

  reply	other threads:[~2011-02-11  4:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-10 21:13 Using Origin hashes to improve rebase behavior John Wiegley
2011-02-10 22:16 ` Johan Herland
2011-02-10 22:54 ` Jeff King
2011-02-11  3:14   ` John Wiegley
2011-02-11  4:45     ` Jeff King [this message]
2011-02-11  5:26       ` John Wiegley
2011-02-12 14:36   ` Thomas Rast
2011-02-11 10:02 ` skillzero
2011-02-11 11:40   ` Johan Herland
2011-02-11 19:03     ` Jeff King
2011-02-11 19:32       ` Junio C Hamano
2011-02-11 19:45         ` Jeff King
2011-02-20 17:49 ` Enrico Weigelt
2011-02-21 23:49 ` Dave Abrahams

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=20110211044539.GA2071@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=johnw@boostpro.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).