From: Alexander Litvinov <hidden> Date: 2016-08-11 19:45:10
How can I see all changes for one file ? Including renames/copies ? Currently
I don't known how to see them :
mkdir 1 && cd 1 && git init-db
defaulting to local storage area
date >> a
git add a
git commit -a -m "1"
Committing initial tree c47d83a6544612309aad57519ca831cf62a489d5
mkdir b
git mv a b/
git commit -a -m "2"
PAGER=cat git log -M -C --pretty=oneline b/a
3b591f7147ee8dbe15fdf456db5730072d41bed8 2
At lastline I would like to see two commits : renaming a -> b/a and creation
of a. By the way, how can I see commit message with git log ?
Thanks for help.
From: Andy Parkins <hidden> Date: 2016-08-11 19:21:04
On Monday 2006 November 20 05:57, Alexander Litvinov wrote:
quoted
PAGER=cat git log -M -C --pretty=oneline b/a
I've come across this too. Personally I'm not sure what use "-C" is. From
the manpage, man git-diff-files (no, this isn't the place I'd look either).
--find-copies-harder
For performance reasons, by default, -C option finds copies only if the
original file of the copy was modified in the same changeset. This flag makes
the command inspect unmodified files as candidates for the source of copy.
This is a very expensive operation for large projects, so use it with
caution.
That is to say that unless the file you are copying was modified AND copied in
the same commit, it won't be searched as a potential source for the copy
operation. I think it would be rare to make a copy of a file I had modified,
surely I'd want to check in modifications before making a copy?
Regardlss, to get the results you want, use the stronger
switch --find-copies-harder, heeding the warning that on big projects it will
be very slow.
Andy
--
Dr Andy Parkins, M Eng (hons), MIEE
From: Alex Riesen <hidden> Date: 2016-08-11 20:11:20
On 11/20/06, Alexander Litvinov [off-list ref] wrote:
How can I see all changes for one file ? Including renames/copies ?
git log -M -C -r --name-status
PAGER=cat git log -M -C --pretty=oneline b/a
At lastline I would like to see two commits : renaming a -> b/a and creation
of a. By the way, how can I see commit message with git log ?