[makefile] 10x speed up checking/fixing 
Author: stas00
Pull request: yes

I present to you an updated `fixup` target which is now super-fast, as it only fixes and validates files that were modified since the branching point, which usually is ~5 out of ~1000. Whoah! Give it a try:

```
make fixup
```
Because of the start up overhead and the 2 customs scripts aren't optimized yet (to check only modified files), currently it's about 10 times faster.

before this PR:
```
time make fixup
real    0m19.272s
user    2m28.253s
sys     0m2.794s
```
after this PR:
```
time make fixup
real    0m2.864s
user    0m2.849s
sys     0m0.778s
```


So what's happening here:

1. `git merge-base --fork-point master` - get a sha of the branching point
2. `git diff --name-only $(git merge-base --fork-point master)` - give us all the filenames that were modified since the branching point (regardless of whether they were staged, and/or pushed or they are still local). The only missing parts would be newly added files that aren't under git yet - shouldn't be a problem though.
3. finally we want to check only specific top-folders so:
`git diff --name-only $(git merge-base --fork-point master) | egrep '^(examples|templates|tests|src|utils)'`
4. now feed that to flake8, black, isort, etc.:
`flake8 $(git diff --name-only $(git merge-base --fork-point master) | egrep '^(examples|templates|tests|src|utils)')`

   but only if there were modified files, so there is an `if` check in the Makefile. otherwise if we get no match - it runs wild on the whole repo and reports things we don't care about.

@sgugger, so if you modify `utils/check_copies.py` to optionally get specific filenames - we can unleash its full power. If you are up for it, do the required modifications and I will take care of the Makefile to pass them on.

----

## refactor repeated dir listings

This PR also refactors repeated dirs  into a single variable on top of the file

@sgugger, @LysandreJik, @sshleifer 

Comments:
# [Codecov](https://codecov.io/gh/huggingface/transformers/pull/7403?src=pr&el=h1) Report
> Merging [#7403](https://codecov.io/gh/huggingface/transformers/pull/7403?src=pr&el=desc) into [master](https://codecov.io/gh/huggingface/transformers/commit/e50a931c118b9f55f77a743bf703f436bf7a7c29?el=desc) will **increase** coverage by `1.83%`.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/huggingface/transformers/pull/7403/graphs/tree.svg?width=650&height=150&src=pr&token=9qOlN6Hb1c)](https://codecov.io/gh/huggingface/transformers/pull/7403?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master    #7403      +/-   ##
==========================================
+ Coverage   77.06%   78.90%   +1.83%     
==========================================
  Files         181      181              
  Lines       35781    35781              
==========================================
+ Hits        27575    28233     +658     
+ Misses       8206     7548     -658     
```


| [Impacted Files](https://codecov.io/gh/huggingface/transformers/pull/7403?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [src/transformers/modeling\_tf\_lxmert.py](https://codecov.io/gh/huggingface/transformers/pull/7403/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9seG1lcnQucHk=) | `22.14% <0.00%> (-72.41%)` | :arrow_down: |
| [src/transformers/modeling\_tf\_xlm.py](https://codecov.io/gh/huggingface/transformers/pull/7403/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl94bG0ucHk=) | `58.52% <0.00%> (-34.74%)` | :arrow_down: |
| [src/transformers/modeling\_marian.py](https://codecov.io/gh/huggingface/transformers/pull/7403/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19tYXJpYW4ucHk=) | `60.00% <0.00%> (-30.00%)` | :arrow_down: |
| [src/transformers/modeling\_tf\_gpt2.py](https://codecov.io/gh/huggingface/transformers/pull/7403/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190Zl9ncHQyLnB5) | `65.38% <0.00%> (-29.59%)` | :arrow_down: |
| [src/transformers/modeling\_xlnet.py](https://codecov.io/gh/huggingface/transformers/pull/7403/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ194bG5ldC5weQ==) | `60.70% <0.00%> (-22.68%)` | :arrow_down: |
| [src/transformers/modeling\_roberta.py](https://codecov.io/gh/huggingface/transformers/pull/7403/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ19yb2JlcnRhLnB5) | `81.51% <0.00%> (-15.11%)` | :arrow_down: |
| [src/transformers/modeling\_transfo\_xl\_utilities.py](https://codecov.io/gh/huggingface/transformers/pull/7403/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190cmFuc2ZvX3hsX3V0aWxpdGllcy5weQ==) | `52.98% <0.00%> (-13.44%)` | :arrow_down: |
| [src/transformers/modeling\_transfo\_xl.py](https://codecov.io/gh/huggingface/transformers/pull/7403/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy9tb2RlbGluZ190cmFuc2ZvX3hsLnB5) | `67.04% <0.00%> (-12.69%)` | :arrow_down: |
| [src/transformers/tokenization\_roberta.py](https://codecov.io/gh/huggingface/transformers/pull/7403/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fcm9iZXJ0YS5weQ==) | `83.11% <0.00%> (-10.39%)` | :arrow_down: |
| [src/transformers/tokenization\_utils\_base.py](https://codecov.io/gh/huggingface/transformers/pull/7403/diff?src=pr&el=tree#diff-c3JjL3RyYW5zZm9ybWVycy90b2tlbml6YXRpb25fdXRpbHNfYmFzZS5weQ==) | `86.33% <0.00%> (-7.58%)` | :arrow_down: |
| ... and [16 more](https://codecov.io/gh/huggingface/transformers/pull/7403/diff?src=pr&el=tree-more) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/huggingface/transformers/pull/7403?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/huggingface/transformers/pull/7403?src=pr&el=footer). Last update [e50a931...9c60161](https://codecov.io/gh/huggingface/transformers/pull/7403?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


This looks cool! Can add the file argument to `check_copies` since it's easy (you can do it too if you prefer to have it in one PR) but since `check_copies` is super fast now, it probably won't add much.

I meant if you wanted to re-enable the blackify functions that were slowing things down.


I'm waiting to see if there actual use cases for that before re-enabling it as there are some ways to make it faster by rewriting the whole script. It would slow down your fast command by quite a bit if a file like roberta has been changed.

Hmm, I haven't thought of the scenario of when a branch gets re-based, since if that is done - currently it will add all the files modified since the branching and not just the files modified by the PR. There must be a way to subtract those changes in the master. I will have to think some more.

If we can successfully get that minimal list of files then any developer not working on roberta shouldn't get impacted by its slowdown.

**edit**: it works just fine with rebasing - it only shows other files if you rebased and haven't committed the change. So all is good here.