gcc/contrib/gcc-changelog
Pierre-Marie de Rodat a634157de1 gcc-changelog: enhance handling of renamings
So far, we expect from a commit that renames a file to contain a
changelog entry only for the new name. For example, after the following
commit:

   $ git move foo bar
   $ git commit

We expect the following changelog:

   * bar: Renamed from foo.

Git does not keep track of renamings, only file deletions and additions.
The display of patches then uses heuristics (with config-dependent
parameters) to try to match deleted and added files in the same commit.
It is thus brittle to rely on this information.

This commit modifies changelog processing so that renames are considered
as a deletion of a file plus an addition of another file. The following
changelog is now expected for the above example:

   * foo: Move...
   * bar: Here.

contrib/

	* gcc-changelog/git_email.py (GitEmail.__init__): Interpret file
	renamings as a file deletion plus a file addition.
	* gcc-changelog/git_repository.py (parse_git_revisions):
	Likewise.
	* gcc-changelog/test_email.py: New testcase.
	* gcc-changelog/test_patches.txt: New testcase.
2020-05-28 11:14:44 +02:00
..
git_check_commit.py
git_commit.py gcc-changelog: handle entries with multi-line file lists 2020-05-26 17:45:58 +02:00
git_email.py gcc-changelog: enhance handling of renamings 2020-05-28 11:14:44 +02:00
git_repository.py gcc-changelog: enhance handling of renamings 2020-05-28 11:14:44 +02:00
git_update_version.py gcc-changelog: remove file descriptor leaks 2020-05-26 17:45:38 +02:00
test_email.py gcc-changelog: enhance handling of renamings 2020-05-28 11:14:44 +02:00
test_patches.txt gcc-changelog: enhance handling of renamings 2020-05-28 11:14:44 +02:00