-
-
Notifications
You must be signed in to change notification settings - Fork 41
Description
A while ago, I needed to incorporate someone else's code into our STIR repo. Unfortunately, I had commited his code in the original repo. So I manipulated history to assign some commits to him. (Sadly, I didn't record exactly what I did but I followed roughly https://stackoverflow.com/a/28845565/15030207). I then incorporated the repo into our STIR repo and moved files. (Roughly along the lines of https://stackoverflow.com/a/1684694/15030207). Checking now output of git fame
, the relevant author doesn't get the credit he (=Carles Falcon) deserves. Am I doing something wrong with the call to git fame
?
As running git fame -wMC
on STIR take a very long time, I've tried to show an example with one of the relevant files is https://github.com/UCL/STIR/blob/master/src/recon_buildblock/PinholeSPECTUB_Weight3d.cxx, original name was wm_SPECT_mph2/weight3d_SPECT_mph.cpp`. For that I get
$ git fame -wMC '--incl=PinholeSPECTUB_Weight3d.cxx|weight3d_SPECT_mph.cpp'
Total commits: 8021
Total ctimes: 30
Total files: 2
Total loc: 73
| Author | loc | coms | fils | distribution |
|:-----------------------|------:|-------:|-------:|:----------------|
| Matthew Strugari | 69 | 15 | 1 | 94.5/ 0.2/50.0 |
| Kris Thielemans | 4 | 5625 | 1 | 5.5/70.1/50.0 |
| Alaleh Rashidnasab | 0 | 1 | 0 | 0.0/ 0.0/ 0.0 |
| Alexander C. Whitehead | 0 | 5 | 0 | 0.0/ 0.1/ 0.0 |
| Alexey Zverovich | 0 | 6 | 0 | 0.0/ 0.1/ 0.0 |
| Ander Biguri | 0 | 63 | 0 | 0.0/ 0.8/ 0.0 |
| Ashley Gillman | 0 | 50 | 0 | 0.0/ 0.6/ 0.0 |
| Benjamin Thomas | 0 | 22 | 0 | 0.0/ 0.3/ 0.0 |
| C. Ross Schmidtlein | 0 | 2 | 0 | 0.0/ 0.0/ 0.0 |
| Carles Falcon | 0 | 2 | 0 | 0.0/ 0.0/ 0.0 |
...
Note that the "Total loc" reported is 73, while actually the file has some 1100 lines. All the ones from Carles are excluded for some reason. Of course, I could be making a mistake with the --incl
option but Carles gets no credit when I don't specify an include.
git blame
reports the correct thing, see here. Carles gets the correct number of commits, so maybe it's the way that I merged the original repo into STIR? (e.g. the commit does not "follow" from the first STIR commit).
The "re-authored" commit is UCL/STIR@dd6fdee. The PR with the move (and other fixes) is UCL/STIR#1100