]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
script: fix credits.sh showing 0 lines changed for mapped emails
authorCasey Bodley <cbodley@redhat.com>
Tue, 8 Aug 2023 14:00:22 +0000 (10:00 -0400)
committerCasey Bodley <cbodley@redhat.com>
Thu, 17 Aug 2023 14:54:46 +0000 (10:54 -0400)
commit902bcd7bc4408a8ef02472ab2b9234e685daf75e
tree00105543a0f78ab9de137b16a8d438b92c0e8d69
parentf13c545cf830d84f20e845491a31b107489f05fc
script: fix credits.sh showing 0 lines changed for mapped emails

script was showing 0 for several contributors because the commit Author:
did not match their mapped address:
```
Number of lines added and removed, by authors
...
   306      0 Radoslaw Zarzynski <rzarzynski@redhat.com>
   307      0 Mike Perez <miperez@redhat.com>
   308      0 Michael J. Kidd <linuxkidd@redhat.com>
   309      0 Lukas Mayer <lmayer@wind.gmbh>
   310      0 Luis Henriques <lhenriques@suse.com>
   311      0 Kyle McGough <kmcgough@digitalocean.com>
   312      0 João Eduardo Luís <joao@suse.de>
   313      0 JinyongHa <jy200.ha@samsung.com>
   314      0 Ilya Dryomov <idryomov@redhat.com>
```

in the case of Ilya and Radoslaw:
```
$ git log --no-merges --pretty='%ae' v17.2.6..v18.2.0 | sed -e "s/'/ /g" | sort -u | grep -e idryomov -e rzarzyns
idryomov@gmail.com
rzarzyns@redhat.com
```

this output gets fed into `git log --numstat --author="$mail"` to fetch
the stats, but that command maps idryomov@gmail.com -> idryomov@redhat.com
and rzarzyns@redhat.com -> rzarzynski@redhat.com so no commits matched.
disabling the mapping for this command with --no-mailmap allows it to
fetch their stats correctly:
```
    14   11809 Radoslaw Zarzynski <rzarzynski@redhat.com>
    16   10051 Ilya Dryomov <idryomov@redhat.com>
```

Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/script/credits.sh