git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: lists@haller-berlin.de (Stefan Haller)
To: avarab@gmail.com (Ævar Arnfjör? Bjarmason)
Cc: git@vger.kernel.org
Subject: Re: Find out on which branch a commit was originally made
Date: Sat, 18 Sep 2010 17:26:08 +0200	[thread overview]
Message-ID: <1jp0xnn.1gyr9a31jn4r7cM%lists@haller-berlin.de> (raw)
In-Reply-To: <AANLkTiknoBS7x2za3qzghfS0TD6UUL83eoZz7LFBPUuc@mail.gmail.com>

Ævar Arnfjör? Bjarmason <avarab@gmail.com> wrote:

>     You want to do X, and you think Y is the best way of doing so.
> Instead of asking about X, you ask about Y.

Erm, not really; I explicitly mentioned Y as "a possible workaround"
only.  Anyway...

> Why do your co-workers think this is essential to the point that they
> can't get by without it? What problem are they trying to solve?

It's a common situation that you want to know why a certain piece of
code is written the way it is.  So you blame it, you eventually end up
at a certain interesting changeset, and hopefully the commit message
tells you enough about why the change was made.  If it doesn't, then it
can help a lot to know a bit more about the context of the change, i.e.
what topic it was part of.

> What Git *does* track however when you do `git merge topic` is the
> name of the `topic` branch you're merging into some other branch,
> e.g. here (from git-merge(1)):
> 
>                      A---B---C topic
>                     /         \
>                D---E---F---G---H master
> 
> Even though A B and C might have been commited on branches called
> `blah`, `bluh` and `blarghl` you'll never know. You'll just know that
> someone put them all together on a branch called `topic` and that
> someone later merged that into master in the main repository. E.g.:
> 
>     Merge: A G
>     Author: Some Guy <some-guy@example.com>
>     Date:   <....>
> 
>         Merge branch 'topic'
> 
> From there you can *infer* that A-B-C came from the topic branch,

OK, that's pretty much the same as what I had in mind.  (We're
simple-minded, so for us "original branch" and topic branch is the same
most of the time.)

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?

-Stefan


-- 
Stefan Haller
Berlin, Germany
http://www.haller-berlin.de/

  parent reply	other threads:[~2010-09-18 15:26 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-18  9:19 Find out on which branch a commit was originally made Stefan Haller
2010-09-18  9:58 ` Ævar Arnfjörð Bjarmason
2010-09-18 10:02   ` Ævar Arnfjörð Bjarmason
2010-09-18 11:28   ` Tor Arntsen
2010-09-18 15:26   ` Stefan Haller [this message]
2010-09-18 16:41     ` Artur Skawina
2010-09-19  9:45       ` Stefan Haller
2010-09-19 12:54         ` Clemens Buchacher
2010-09-19 14:03         ` Artur Skawina
2010-09-19 14:08         ` Stefan Haller
2010-09-19 16:38           ` Artur Skawina
2010-09-19 18:30     ` Robin Rosenberg
2010-09-19 22:03       ` Seth Robertson
2010-09-19 23:12         ` Artur Skawina
2010-09-19 23:54           ` Seth Robertson
2010-09-20  1:31             ` Artur Skawina
2010-09-20  5:47               ` Seth Robertson
2010-09-20  8:12                 ` Stefan Haller
2010-09-20 10:58                   ` Artur Skawina
2010-09-20 15:49                     ` Artur Skawina
2010-09-21  0:15                       ` Seth Robertson
2010-09-21  2:12                         ` Artur Skawina
2010-09-22 16:35                           ` ANNOUNCE git-what-branch (was Re: Find out on which branch a commit was originally made) Seth Robertson
2010-09-22 20:27                             ` Artur Skawina
2010-09-22 23:26                               ` Find out on which branch a commit was originally made) (was ANNOUNCE git-what-branch) Seth Robertson
2010-09-23 13:14                                 ` Stephen Bash
2010-09-23 13:26                                   ` Ævar Arnfjörð Bjarmason
2010-09-23 21:32                                     ` Artur Skawina
2010-09-24  1:33                                       ` Artur Skawina
2010-09-24 20:57                                       ` Seth Robertson
2010-09-23 14:27                                   ` Seth Robertson
2010-09-20 18:20                     ` Find out on which branch a commit was originally made Stefan Haller
2010-09-24 18:26 ` Bryan Drewery

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=1jp0xnn.1gyr9a31jn4r7cM%lists@haller-berlin.de \
    --to=lists@haller-berlin.de \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.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 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).