Thread (1 message) 1 message, 1 author, 2016-06-15
  • (off-list ancestor, not in this archive)
  • Re: On blame/pickaxe · Junio C Hamano <hidden> · 2016-06-15

Re: On blame/pickaxe

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:44

Petr Baudis [off-list ref] writes:
quoted
quoted
quoted
If the user is not prepared to see code movement, pickaxe can be
run without -M nor -C to get the classic blame output.
Ok, so in this case -M and -C does not mean just looking for
copies/movements in other files but inside the same file as well.

Perhaps we might want to differentiate those two cases since searching
in all files might be significantly slower.
I do not personally worry about people confusing -M/-C to
pickaxe with -M/-C given to diff (to pickaxe, use of diff is
purely an internal implementation issue), and reused -M and -C
to mean quite different things.  -M is to detect line movement
inside a file (it is not strictly limited to "line movement",
though. It _is_ about "copies and moves within the same file").
On the other hand, -C (and its stronger form -C -C) is to detect
copies and moves across file boundaries (but wholesale "file
rename" comes as part of the basic algorithm so you do not have
to ask for it with -M nor -C).  So in that sense pronouncing M
"move" and C "copy" is not accurate.  Their differences is
already what you said "we might want".

However they match the cost expectation people are used to in
diff options pretty well.  -M is not so expensive and -C is
somewhat.  -C -C is like find-copies-harder and is quite
expensive.

Also currently the code does not do "move" detection at all.
Contrary to intuition, move detection is more expensive than
copy detection in this case.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help