From: Linus Torvalds <torvalds@osdl.org>
To: sean <seanlkml@sympatico.ca>
Cc: Aubrey <aubreylee@gmail.com>, git@vger.kernel.org
Subject: Re: how to trace the patch?
Date: Thu, 27 Apr 2006 08:55:51 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0604270843190.3701@g5.osdl.org> (raw)
In-Reply-To: <BAYC1-PASMTP029B6CB13A6C0BA3956E17AEBD0@CEZ.ICE>
On Thu, 27 Apr 2006, sean wrote:
>
> $ git log -- <filename>
>
> To see a list of commits that affected the file you're interested in.
>
> $ git log -p -- <filename>
>
> Will include a diff after each commit showing you how the file was
> changed. And if you want to see what other changes happened in each
> commit that modified your file, add "--full-diff" to the command above.
Side note: the "git log -p" thing only works with git 1.3.0+, and even
without the "-p", old versions will be very slow.
So if you have anything older than 1.3.0, you're likely better off using
"git whatchanged [-p] -- <filename>".
Also, regardless of which one you use, it's worth pointing out that:
- for tracking multiple files, just use more than one filename, and you
can also use a directory name.
- you can combine this with all the normal revision limiting rules, which
is often useful when you know you're not interested in stuff you've
already seen.
For example, if you have just done a "git pull" and you noticed that a
file (or set of files) you cared about changed - or you just wonder _if_
it changed - you can do something like
gitk ORIG_HEAD.. -- drivers/scsi/ include/scsi/
to see what changed due to the pull within those files. Useful whether
you're tracking certain subsystems, individual drivers, architectures,
whatever.. It can be useful also just to split the logs up (ie maybe
you're not interested in anything in particular, but you do a "git log"
and see something that strikes your fancy, you can decide to see what
_else_ changed in that area).
And instead of "gitk", use "git log -p" or "git whatchanged" or whatever.
It's all the same thing, just different ways of looking at it.
Linus
next prev parent reply other threads:[~2006-04-27 15:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-27 10:06 how to trace the patch? Aubrey
[not found] ` <20060427065728.35a4ae51.seanlkml@sympatico.ca>
2006-04-27 10:57 ` sean
2006-04-27 15:55 ` Linus Torvalds [this message]
2006-04-27 16:19 ` Aubrey
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=Pine.LNX.4.64.0604270843190.3701@g5.osdl.org \
--to=torvalds@osdl.org \
--cc=aubreylee@gmail.com \
--cc=git@vger.kernel.org \
--cc=seanlkml@sympatico.ca \
/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).