git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Piotr Krukowiecki <piotr.krukowiecki@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [RFC] git blame-tree
Date: Wed, 2 Mar 2011 16:41:42 -0500	[thread overview]
Message-ID: <20110302214142.GH20400@sigill.intra.peff.net> (raw)
In-Reply-To: <AANLkTi=hqVcGw16q6uJBO5kPjKtsa=ujtQxg4FRj_+i6@mail.gmail.com>

On Wed, Mar 02, 2011 at 10:24:29PM +0100, Piotr Krukowiecki wrote:

> So it's like this?
> 
> B1
> |
> M - B2
> |
> P <- changes foo

Yes.

> > What do we output? Both branches have equal claim to the commit.
> 
> That's easy. In "show only differences" we don't show anything,
> because on both branches last-change-commit of "foo" is the same.
> In "show all" last-change-commit is P so show it (with message like
> "changed in common root" or whatever).

Ah, that is totally not the output I would have expected. But now I
understand a little better what you are talking about. In the former
case, you are interested in a blame traversal going to the merge-base of
branch1 and branch2, and you are interested in the source. So I think
you could do it with something like:

  git blame-tree dir --left-right branch1...branch2

though of course the current output doesn't actually notice things like
left-right markings from the revision traversal machinery.

And then there is also the question of representing greater than two
branches. If "foo" blames to a commit that is in branch1 and branch2,
but not branch3, what should be output? Presumably you would want it
enumerated as "branch1 and branch2 touched it in commit X, branch three
touched it in commit Y". But I'm not sure how well git's revision
machinery tracks more than two sources.

> I think this is simple, but maybe I don't understand some git
> internals that make it hard.

I think it is possible, and probably would build on top of the work I am
doing. But I am going to try to get the basics right first, and then we
can see about building other stuff on top.

-Peff

  reply	other threads:[~2011-03-02 21:41 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-02 16:40 [RFC] git blame-tree Jeff King
2011-03-02 17:16 ` Jeff King
2011-03-02 17:51   ` Piotr Krukowiecki
2011-03-02 18:07     ` Jeff King
2011-03-02 18:39       ` Piotr Krukowiecki
2011-03-02 21:10         ` Jeff King
2011-03-02 21:24           ` Piotr Krukowiecki
2011-03-02 21:41             ` Jeff King [this message]
2011-03-02 18:31   ` Junio C Hamano
2011-03-02 21:04     ` Jeff King
2011-03-02 23:22       ` Junio C Hamano
2011-03-03 15:36         ` Jeff King
2011-03-05  5:41     ` Ryan Tomayko
2011-03-03 20:20   ` Jakub Narebski
2011-03-02 17:40 ` Jeff King
2011-03-04 14:40 ` Will Palmer
2011-03-04 14:53   ` Jeff King

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=20110302214142.GH20400@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=piotr.krukowiecki@gmail.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).