[PATCH] git-backport: support renamed .cc files in commit message.

Martin Liška mliska@suse.cz
Wed Jan 12 15:54:46 GMT 2022


Hi.

There's a patch that enhances git-backport so that it updates commit
messages for files which name ends now with .cc and is still .c on a branch.

Example usage:

$ git show test
commit 8ed4b2cb9aa158c0ef418fd1ac66271664904604 (test)
Author: Martin Liska <mliska@suse.cz>
Date:   Wed Jan 12 16:08:13 2022 +0100

     Fix file.
     
     gcc/ChangeLog:
     
             * ipa-icf.cc: Test me.
     
     gcc/ada/ChangeLog:
     
             * cal.c: aaa.
     
     libcpp/ChangeLog:
     
             * expr.cc: aaa.

$ git gcc-backport test
Auto-merging gcc/ada/cal.c
Auto-merging gcc/ipa-icf.c
Auto-merging libcpp/expr.c
[test2 ee40feb077e] Fix file.
  Date: Wed Jan 12 16:08:13 2022 +0100
  3 files changed, 3 insertions(+)
Commit message updated: 2 .cc file(s) changed.

$ git show test2
commit f59a1e736c1b68f07d83388a994df8d043e8aa6e (test2)
Author: Martin Liska <mliska@suse.cz>
Date:   Wed Jan 12 16:08:13 2022 +0100

     Fix file.
     
     gcc/ChangeLog:
     
             * ipa-icf.c: Test me.
     
     gcc/ada/ChangeLog:
     
             * cal.c: aaa.
     
     libcpp/ChangeLog:
     
             * expr.c: aaa.
     
     (cherry picked from commit 8ed4b2cb9aa158c0ef418fd1ac66271664904604)

Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-git-backport-support-renamed-.cc-files-in-commit-mes.patch
Type: text/x-patch
Size: 2987 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20220112/7a188a91/attachment.bin>


More information about the Gcc mailing list