All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Nicolas Pitre <nico@cam.org>
Cc: Jakub Narebski <jnareb@gmail.com>,
	Harry Duin <hduin@optionshouse.com>,
	"'Alex Riesen'" <raa.lkml@gmail.com>,
	"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: branch management
Date: Wed, 10 Jun 2009 10:37:16 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.2.01.0906101026121.6847@localhost.localdomain> (raw)
In-Reply-To: <alpine.LFD.2.00.0906101118070.31536@xanadu.home>



On Wed, 10 Jun 2009, Nicolas Pitre wrote:

> On Wed, 10 Jun 2009, Jakub Narebski wrote:
> 
> > Harry Duin <hduin@optionshouse.com> writes:
> > 
> > > 2. show list of files/directories touched by a branch (useful when
> > >    looking for past fixes, but are unsure where the fix was done)
> > 
> > If you can use pickaxe search (git log -S...), or git-blame, or just
> > looking throught "git log ... -- <path>", you can use
> > 
> > $ git rev-list master..branch | 
> >   git diff-tree --stdin -r --name-only |
> >   sort -u
> 
> What I use in that case is simply
> 
> 	git diff --stat master...branch

No, that's not going to work in general. The "master...branch" thing works 
most of the time, but there isn't always a single merge-point, and in the 
case of criss-cross merges, you'll get it wrong.

It will also hide changes that got reverted (or undone some other way), 
which can be relevant.

That said, the "git rev-list | git diff-tree" thing has a new name. We 
call it "git log". 

So what Jakub wrote can generally be written as

	git log --name-only --pretty=format:'' master..branch | sort -u

if you're willing to accept the empty line from all the suppressed commit 
messages (with that "git diff-tree" he'll see all the commit numbers, 
though, so I guess the 'git log' thing is still better)

			Linus

  reply	other threads:[~2009-06-10 17:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-09  6:26 [PATCH] show-branch: fix segfault when showbranch.default exists Junio C Hamano
2009-06-09  7:17 ` Stephen Boyd
2009-06-09  8:06   ` Pierre Habouzit
2009-06-09 16:28     ` Junio C Hamano
2009-06-09 17:23       ` Pierre Habouzit
2009-06-09 17:35         ` branch management Harry Duin
2009-06-09 19:50           ` Alex Riesen
2009-06-10 14:02             ` Harry Duin
2009-06-10 14:43               ` Jakub Narebski
2009-06-10 15:28                 ` Nicolas Pitre
2009-06-10 17:37                   ` Linus Torvalds [this message]
2009-06-10 19:14               ` Daniel Barkalow
  -- strict thread matches above, loose matches on Subject: below --
2021-08-10 22:24 Branch Management mail.chris.az
2021-08-11  6:31 ` Bagas Sanjaya

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=alpine.LFD.2.01.0906101026121.6847@localhost.localdomain \
    --to=torvalds@linux-foundation.org \
    --cc=git@vger.kernel.org \
    --cc=hduin@optionshouse.com \
    --cc=jnareb@gmail.com \
    --cc=nico@cam.org \
    --cc=raa.lkml@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.