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 13:21:29 -0800 [thread overview]
Message-ID: <7vr6g0mip2.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <790332.92389.qm@web45907.mail.sp1.yahoo.com> (Max Pollard's message of "Tue, 29 Jan 2008 13:07:50 -0800 (PST)")
Max Pollard <ajaxsupremo@yahoo.com> writes:
>> Max Pollard writes:
>>
>> > 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
>>
>
> ... So -C -C is the answer, with --name-status or --stat to
> actually show the result.
The real "answer" part in that example is not -C -C. Obviously,
you would need double-C aka --find-copies-harder, because you
did not change a.txt when creating b.txt, so it is still needed.
But the essential part of the answer is "not giving b.txt as the
pathspec, so that whatever _other_ file that could have been
copied into it is still visible when the command works".
If you say "git log --name-status -C -C -- b.txt", you would be
back to square one.
next prev parent reply other threads:[~2008-01-29 21:22 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
2008-01-29 21:07 ` Max Pollard
2008-01-29 21:21 ` Junio C Hamano [this message]
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=7vr6g0mip2.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