3 ms·
Does this really work consistently? Like merging in a small java method into the middle of an existing class with a couple of methods.
by mnsc 3y ago
Does this really work consistently? Like merging in a small java method into the middle of an existing class with a couple of methods.
- cerved 3y agoPretty sure the answer is no
- Izkata 3y agoThat's what the -C flag is for, to make it more/less sensitive. So answer is "yes, if you use it", and this is what it looks like: $ git blame file3 -C1 9afddd5e file3 (Izkata 2024-01-01 11:40:51 -0600 1) 9c8635a7 file2 (Izkata 2024-01-01 11:40:27 -0600 2) 4 9c8635a7 file1 (Izkata 2024-01-01 11:40:27 -0600 3) e 9afddd5e file3 (Izkata 2024-01-01 11:40:51 -0600 4) Also fun fact, -C can be given up to 3 times: 1 - Look for the source in files modified in the same commit 2 - Look for the source in any file that existed as of that same commit 3 - Look for the source in any commit Great for if you suspect the original committer didn't do the delete/add (move) in one commit.
- cerved 3y agooh cool, I didn't know that, thanks