From: Liu Yubao <yubao.liu@gmail.com>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: Re: how to show log for only one branch
Date: Mon, 06 Nov 2006 18:41:57 +0800 [thread overview]
Message-ID: <454F1175.9080506@gmail.com> (raw)
In-Reply-To: <7vk629f6is.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
> Liu Yubao <yubao.liu@gmail.com> writes:
>
Snip many great detailed description, thank you very much, I have
a question about the way git treats fast forwarding but that will
be another topic.
> What's mainline is _not_ important, and which parent is first is
> even less so. It solely depends on what you are looking for
> which branch matters more. Putting too much weight on the
> difference between HEAD^1 vs HEAD^2 statically does not make any
> sense.
>
> Reflecting this view of history, git log and other history
> traversal commands treat merge parents more or less equally, and
> _how_ you ask your question affects what branches are primarily
> followed. For example, if somebody is interested in your device
> driver work, this command:
>
> git log -- drivers/liu-s-device/
>
> would follow your side branch. On the other hand,
>
> git log -- fs/
>
> would follow Linus's development track while you were forked, if
> you did not do any fs/ work while on that side branch and
> Linus's development track had works in that area, _despite_ the
> merge you gave Linus has your development track as its first
> parent.
>
This is perfect and enough for two branches that work on different
files, but if two branches modify same files, "git log" can't separate
commits clearly. For example, I want to know what happened in your
git's "next" branch, I hope to get logs like this:
Merge branch 'jc/pickaxe' into next
Merge branch 'master' into next
Merge branch 'js/modfix' into next
...
some good work
...
Merge branch ....
I just want to *outline* what happened in "next" branch, if I am interested
in what have been merged from 'jc/pickaxe' I can follow the merge point again
or use something like "git log --follow-all-parents".
Instead, "git log" interlaces logs from many branches, I find it's a little
confused: why does "git log" of current branch contain many logs from other
branches? (This is not a real question, I know the reason)
I indeed understand that HEAD^1 is not always the commit that my work
bases on before a merge (thanks for your detailed description again:-),
it doesn't make sense to show HEAD~1, HEAD~2, HEAD~3 and so on, that's
to say 'git log' will never meet my requirement.
Maybe reflog is what I need, I want to know which commits "next" have pointed
to, but reflog is only for local purpose, it's not downloaded by 'git clone'
next prev parent reply other threads:[~2006-11-06 10:42 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-06 3:41 how to show log for only one branch Liu Yubao
2006-11-06 6:12 ` Junio C Hamano
2006-11-06 10:41 ` Liu Yubao [this message]
2006-11-06 18:16 ` Junio C Hamano
2006-11-07 2:21 ` Liu Yubao
2006-11-07 8:21 ` Jakub Narebski
2006-11-06 13:00 ` If merging that is really fast forwarding creates new commit [Was: Re: how to show log for only one branch] Liu Yubao
2006-11-06 13:39 ` If merging that is really fast forwarding creates new commit Rocco Rutte
2006-11-07 3:42 ` Liu Yubao
2006-11-06 13:43 ` If merging that is really fast forwarding creates new commit [Was: Re: how to show log for only one branch] Andreas Ericsson
2006-11-07 3:26 ` Liu Yubao
2006-11-07 9:30 ` Andy Whitcroft
2006-11-07 12:05 ` Liu Yubao
2006-11-07 12:17 ` Jakub Narebski
2006-11-06 15:48 ` Linus Torvalds
2006-11-06 16:03 ` Martin Langhoff
2006-11-06 17:48 ` Linus Torvalds
2006-11-07 7:59 ` Liu Yubao
2006-11-07 17:23 ` Linus Torvalds
2006-11-07 18:23 ` If merging that is really fast forwarding creates new commit Junio C Hamano
2006-11-07 11:46 ` If merging that is really fast forwarding creates new commit [Was: Re: how to show log for only one branch] Eran Tromer
2006-11-07 7:27 ` Liu Yubao
2006-11-07 9:46 ` Andy Whitcroft
2006-11-07 12:08 ` Liu Yubao
2006-11-07 13:15 ` Andy Whitcroft
2006-11-07 16:05 ` Linus Torvalds
2006-11-07 16:39 ` Jakub Narebski
2006-11-07 21:37 ` If merging that is really fast forwarding creates new commit Junio C Hamano
2006-11-07 22:02 ` Planned new release of git [was: Re: If merging that is really fast forwarding creates new commit] Jakub Narebski
2006-11-07 23:06 ` Linus Torvalds
2006-11-07 23:36 ` Planned new release of git Junio C Hamano
2006-11-07 23:19 ` Junio C Hamano
2006-11-06 15:25 ` how to show log for only one branch Jakub Narebski
2006-11-07 3:47 ` Liu Yubao
2006-11-07 8:08 ` Jakub Narebski
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=454F1175.9080506@gmail.com \
--to=yubao.liu@gmail.com \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/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).