git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Linus Torvalds <torvalds@osdl.org>
To: Frank Sorenson <frank@tuxrocks.com>
Cc: git@vger.kernel.org
Subject: Re: How do I...
Date: Fri, 6 May 2005 09:13:27 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.58.0505060905090.2233@ppc970.osdl.org> (raw)
In-Reply-To: <427B3DB3.4000507@tuxrocks.com>



On Fri, 6 May 2005, Frank Sorenson wrote:
> 
> Okay, I've got some "How can I?" questions.  I hope I'm not the only one
> still working to "git it".
> 
> How can I git a list of commits that have modified a particular file?
> For example, I'd like to do something like this:
> # git-file-revs Makefile
> f7eb55878f11575281add2a5726e483aed5e45bb
> aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
> bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb

There has been at least two different scripts for this posted, and one C 
source code version.

I just haven't integrated them, because I'm an idiot, and too much choice 
makes me run around in small circles and clucking.

Guys - whoever wrote one of the scripts, can you please send out your 
current version to the git list and cc me, and explain why yours is 
superior to the other peoples version. Please?

But I might cook something up myself too. 

> How can I output a list of the filename(s) modified by a particular
> commit? (for example)
> # git-commit-info files 6741f3a7f9922391cd02b3ca1329e669497dc22f

You need to use "git-tree-diff", but it doesn't want one commit, it wants 
two.

In the case of "what did this one commit change", you need to look up its 
parents (there can be more than one! In fact, the current git repository 
has one entry with _five_ parents), and then you need to select one of 
them as the reference. In other words, if it's a merge, you need to select 
which side you care about.

> Can I use cg-log to output just the information about a particular
> commit?  (I don't need all the commits, just the one I'm interested in).

You don't even need cg-log for that. If you already know which commit 
you're interested in, just output that one commit:

	git-cat-file commit <commit-name-here>

> After doing a cg-update, can I cg-log just the changes since the last
> update?  Alternatively, how can I tell cg-log I'm caught up, and don't
> need anything historical?

I don't know how to do with with cg-update, but if you use the 
"git-pull-script" thing, you can do

	git-diff-tree -p ORIG_HEAD HEAD

which shows you what the pull brought in.

> Can I do these with git/cogito, or will I need to start diving deeper
> into the code?

Apart from finding the "which commit changed this", it's all trivially 
doable. And the "which commit" thing is also trivially doable if you just 
find the script..

		Linus

  parent reply	other threads:[~2005-05-06 16:04 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-06  9:49 How do I Frank Sorenson
2005-05-06  9:59 ` Thomas Glanzmann
2005-05-06 10:03   ` Thomas Glanzmann
2005-05-06 14:37 ` Dave Kleikamp
2005-05-06 16:39   ` Frank Sorenson
2005-05-06 17:58     ` Dave Kleikamp
2005-05-06 19:07       ` Frank Sorenson
2005-05-06 16:13 ` Linus Torvalds [this message]
2005-05-06 16:35   ` Junio C Hamano
2005-05-06 16:47     ` Frank Sorenson
2005-05-06 17:31       ` Daniel Barkalow
2005-05-06 18:56         ` Frank Sorenson
2005-05-06 17:09     ` Linus Torvalds
2005-05-06 18:39       ` David Woodhouse
2005-05-06 18:59         ` Linus Torvalds
2005-05-06 19:10           ` David Woodhouse
2005-05-06 22:57             ` Linus Torvalds
2005-05-06 23:20               ` David Woodhouse
2005-05-06 23:54                 ` Linus Torvalds
2005-05-07  8:58                   ` David Woodhouse
2005-05-06 19:35           ` Thomas Kolejka
2005-05-06 16:36   ` David Woodhouse
2005-05-07  0:45     ` Benjamin Herrenschmidt
2005-05-06 18:58 ` Linus Torvalds

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.58.0505060905090.2233@ppc970.osdl.org \
    --to=torvalds@osdl.org \
    --cc=frank@tuxrocks.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).