Artur Skawina <art.08.09@xxxxxxxxx> wrote: > On 09/18/10 17:26, Stefan Haller wrote: > > Ævar Arnfjör? Bjarmason <avarab@xxxxxxxxx> wrote: > >> A---B---C topic > >> / \ > >> D---E---F---G---H master > > > The question is the same though: if I hit commit B while blaming, how do > > I know what topic it was a part of? For that, I need to find commit H > > which will tell me, right? How do I do that? > > git rev-list --ancestry-path --merges --reverse B..master --format=oneline Thanks, this is helpful. (However, my co-workers will probably laugh at me if I suggest they remember a command such as this for what they think should be a very simple operation.) There's a problem though for commits that are far back in history: A---B---C topic / \ D---E---F---G---H---I---J---K---L---M---N master \ / O---P---Q another-topic Your command also shows M, which is not interesting at all in this context. Ideally it should stop at the first command that's common to topic and master. Is there an easy way to achieve that? > IOW if you know you could still need the old branch info, make an alias > that doesn't actually delete the branch after merging, but moves the ref > away, eg 'topic-name' -> "merged/topic-name" or just adds a > "merged/topic-name" tag. Then simply checking from which "merged/*" > branch/tag the offending commit is reachable would be enough. Same problem here: this also shows all branches that were created and merged after the original topic was merged. (In the example above, it will also list another-topic.) This makes it pretty much impossible to find the one I'm interested in. -- Stefan Haller Berlin, Germany http://www.haller-berlin.de/ -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html