oleander / git-fame-rb

A command-line tool that helps you summarize and pretty-print collaborators based on contributions
MIT License
948 stars 73 forks source link

An option to merge different authors into one #88

Open henno opened 6 years ago

henno commented 6 years ago
+----------------------+---------+---------+-------+--------------------+
| 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 |
| rasmus@hot.ee        | 3,266   | 203     | 56    |  0.5 / 25.6 /  3.0 |

How would one merge different Rasmuses into single row? --merge Rasmus=rasmus,Rasmus2,rasmus@hot.ee would be logical option to me

thoughtpunch commented 5 years ago

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

Flowkap commented 5 years ago

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

ORESoftware commented 5 years ago

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

StrangeWill commented 1 year ago

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 commented 1 year ago

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.

oleander commented 1 year ago

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