Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Max Pollard <ajaxsupremo@yahoo.com>
Cc: git@vger.kernel.org
Subject: Re: Can git log <file> follow log of its origins?
Date: Tue, 29 Jan 2008 12:03:06 -0800	[thread overview]
Message-ID: <7v63xco0w5.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: 333479.13589.qm@web45901.mail.sp1.yahoo.com

Max Pollard <ajaxsupremo@yahoo.com> writes:

> If I do the following:
>
>      $ git init
>      $ echo "The brown fox is getting old" > a.txt
>      $ git add a.txt
>      $ git commit -m "Commit a.txt"
>
>      $ cp a.txt b.txt
>      $ git add b.txt
>      $ git commit -m "Copy a.txt to b.txt"
>
>      $ git log b.txt
>
> I only see the log corresponding to the 2nd commit (v1.5.3.5).

That is what you are asking "git log" to show.  "git log b.txt"
means "please simplify the history by throwing away commits that
do not have changes to paths that match b.txt, and then show the
resulting log with the change pertaining to that path".  The
first commit does not change a path called b.txt (in other
words, "git show --stat HEAD^" will not give diffstat for "b.txt"),
so that commit is not shown.

$ git log --pretty=oneline --name-status -C -C

  parent reply	other threads:[~2008-01-29 20:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-29 17:48 Can git log <file> follow log of its origins? Max Pollard
2008-01-29 18:17 ` Sean
2008-01-29 19:47   ` Max Pollard
2008-01-29 20:03 ` Junio C Hamano [this message]
2008-01-29 21:07   ` Max Pollard
2008-01-29 21:21     ` Junio C Hamano
2008-01-29 21:40       ` Max Pollard

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=7v63xco0w5.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=ajaxsupremo@yahoo.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