git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zack Brown <zacharyb@gmail.com>
To: git@vger.kernel.org
Subject: Using "git log" to find the files patched at the same time as a named  file
Date: Wed, 3 Feb 2010 15:38:03 -0500	[thread overview]
Message-ID: <218b69371002031238y6a377b06x76b8f8e87ea0ee46@mail.gmail.com> (raw)

Hi folks,

If I have a filename I'm interested in, and I want to find other files
that have been modified in the same commits that modified the file I'm
interested in, how could I do that with git?

If I give the command
$ git log --name-only
then the bottom of each log entry will list all the files that were
modified by that commit. That's basically what I want, except that the
command will list all log entries, not just the ones that modified the
file I'm interested in.

If I give the command
$ git log --name-only fs/fuse/file.c
then the bottom of each log entry only lists fs/fuse/file.c, even if
the very same commit showed up in the output from the previous command
with multiple files in addition to that one. In other words, the "git
log --name-only fs/fuse/file.c" command will only list fs/fuse/file.c
as being changed, in commits that I know changed more than just that
one file.

Is there a git command that will run in roughly the same amount of
time as the ones given above (i.e. with only a single invocation of
git), but that will only output the commits that affected the file I'm
interested in, and that will also list any other files changed in
those same commits?

Many thanks,
Zack

-- 
Zack Brown

             reply	other threads:[~2010-02-03 20:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-03 20:38 Zack Brown [this message]
2010-02-03 20:52 ` Using "git log" to find the files patched at the same time as a named file Junio C Hamano
2010-02-03 21:14   ` Zack Brown
2010-02-03 21:36     ` Junio C Hamano
2010-02-03 21:52       ` Zack Brown

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=218b69371002031238y6a377b06x76b8f8e87ea0ee46@mail.gmail.com \
    --to=zacharyb@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).