git-fame-rb icon indicating copy to clipboard operation
git-fame-rb copied to clipboard

An option to merge different authors into one

Open henno opened this issue 5 years ago • 6 comments

+----------------------+---------+---------+-------+--------------------+
| name                 | loc     | commits | files | distribution (%)   |
+----------------------+---------+---------+-------+--------------------+
| rasmus               | 435,183 | 92      | 1,639 | 66.2 / 11.6 / 88.2 |
| CA                   | 23,111  | 37      | 182   |  3.5 /  4.7 /  9.8 |
| Rasmus2              | 7,406   | 148     | 62    |  1.1 / 18.7 /  3.3 |
| Asko                 | 5,407   | 20      | 12    |  0.8 /  2.5 /  0.6 |
| [email protected]        | 3,266   | 203     | 56    |  0.5 / 25.6 /  3.0 |

How would one merge different Rasmuses into single row? --merge Rasmus=rasmus,Rasmus2,[email protected] would be logical option to me

henno avatar Aug 10 '18 20:08 henno

parse this table to a CSV (or use the csv output) and merge in a spreadsheet editor. Alternately use the ruby object that generates the report directly and merge by hash keys

thoughtpunch avatar Oct 05 '18 18:10 thoughtpunch

Just use the git feature .mailmap as git-fame uses git commands it will work :)

Flowkap avatar Sep 16 '19 15:09 Flowkap

a config file like this would work:

usernames: {
  'rasmus':  ['rasmus', 'rasmus2']
}

users could put it in "$HOME/.gitfame/config.json" since it's unlikely to differ

ORESoftware avatar Sep 16 '19 16:09 ORESoftware

Just use the git feature .mailmap as git-fame uses git commands it will work :)

As far as I can tell: this isn't actually working, git check-mailup is returning the correct map, but git fame is still returning the e-mails as not merged, not sure if I'm doing something wrong...

StrangeWill avatar Nov 08 '22 02:11 StrangeWill

According to this issue: https://github.com/libgit2/rugged/issues/937 Rugged, the library we seem to use to access libgit2 doesn't actually support .mailmap, so I guess it's manual merge for me.

StrangeWill avatar Nov 08 '22 03:11 StrangeWill

A --merge option would be good. I'm open for PRs

oleander avatar Mar 09 '23 16:03 oleander