{"thread":{"id":"40706","subject":"git filter-branch and merging of signed tags","startedAt":"2015-11-02T08:04:28Z","lastAt":"2015-11-02T17:13:26Z","messageCount":3,"participants":["Uwe Kleine-König","Michael J Gruber"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"272725","messageId":"20151102080428.GO4931@pengutronix.de","threadId":"40706","inReplyTo":null,"subject":"git filter-branch and merging of signed tags","fromName":"Uwe Kleine-König","fromEmail":"u.kleine-koenig@pengutronix.de","sentAt":"2015-11-02T08:04:28Z","receivedAt":"2015-11-02T08:04:28Z","isPatch":false,"sender":{"key":"u.kleine-koenig@pengutronix.de","avatar":"https://gravatar.com/avatar/354b5e3ceb2806a2f1e1e382ac29ddbdad18288654da62b61eb13583a857eee7?d=mp&s=160"},"body":"Hello,\n\nConsider I want to rewrite a commit that is a merge of a signed tag. In\nmy case that's 064ca93f7ab927c2752d86fc5727716e340d737c that currently\nsits in linux-next:\n\n\t~/gsrc/linux$ git version\n\tgit version 2.6.1\n\t~/gsrc/linux$ git checkout 064ca93f7ab927c2752d86fc5727716e340d737c\n\t~/gsrc/linux$ git cat-file commit HEAD\n\ttree 7086bbd51d06ebd0e3fcca70380d0a066efce6ef\n\tparent e44a01fa0e0aec2f3a21dadb9c030d14831d4258\n\tparent f719a0d6a8541b383c506aaa4b4fa6b4109669f4\n\tauthor Arnd Bergmann <arnd@arndb.de> 1444139956 +0200\n\tcommitter Arnd Bergmann <arnd@arndb.de> 1444139956 +0200\n\tmergetag object f719a0d6a8541b383c506aaa4b4fa6b4109669f4\n\t type commit\n\t tag efm32-for-4.4-rc1\n\t tagger Uwe Kleine-König <uwe@kleine-koenig.org> 1443549594 +0200\n\t \n\t efm32 cleanups for 4.4-rc1\n\t \n\t These are just two followup cleanups for commits that are in v3.17-rc1 and\n\t waited in my private tree for application since that time.\n\t -----BEGIN PGP SIGNATURE-----\n\t \n\t iQEcBAABCgAGBQJWCtIwAAoJEMH8FHityuwJFPYH/2LJpi0yUhI01s0D9U5rZgjl\n\t 8mLP70utAMaqXiGqP/O0ndH+za5TrrUTwDJE5jhAHru1Q6q62Ld2BfOR5+K8zlrP\n\t 4UDGBDj3ePJgEtbSsJYJIRT+AKque2GONbeGpJh2arPrNamWChKIz8HoGSgwdRlx\n\t TvQuVFEa6C3ujP0ATM8x54f0vR4bYm9WmBS522DwZQY4JpGZC005A3Quw6fmFxPJ\n\t vJRo1fE1d2OZ3Cuxb15m8PLtZw6sbMdMwgyirAFGrJsN9u/V6BzsSzH0s8suT7IP\n\t WIohnmYtFSUfkQjaGrMl2wIpJSsIzettiXf9GrQDXSGZsQ4k7sW3U+qrcZ7ZUR4=\n\t =ngv1\n\t -----END PGP SIGNATURE-----\n\n\tMerge tag 'efm32-for-4.4-rc1' of git://git.pengutronix.de/git/ukl/linux into next/cleanup\n\n\tMerge \"efm32 cleanups for 4.4-rc1\" from Uwe Kleine-Koenig:\n\n\tThese are just two followup cleanups for commits that are in v3.17-rc1 and\n\twaited in my private tree for application since that time.\n\n\t* tag 'efm32-for-4.4-rc1' of git://git.pengutronix.de/git/ukl/linux:\n\t  ARM: efm32: switch to vendor,device compatible strings\n\t  ARM: efm32: switch to properly namespaced location property\n\nOK, to fix my name in the commit log I do:\n\n\t git filter-branch -f --msg-filter \"sed 's/Kleine-Koenig/$(echo Kleine-K+APY-nig | iconv -f utf-7 -t utf-8)/'\" HEAD ^HEAD^ ^HEAD^2\n\nThis destroys the mergetag, as now I have:\n\n\t~/gsrc/linux$ git cat-file commit HEAD\n\ttree 7086bbd51d06ebd0e3fcca70380d0a066efce6ef\n\tparent e44a01fa0e0aec2f3a21dadb9c030d14831d4258\n\tparent f719a0d6a8541b383c506aaa4b4fa6b4109669f4\n\tauthor Arnd Bergmann <arnd@arndb.de> 1444139956 +0200\n\tcommitter Arnd Bergmann <arnd@arndb.de> 1444139956 +0200\n\n\t efm32 cleanups for 4.4-rc1\n\t \n\t These are just two followup cleanups for commits that are in v3.17-rc1 and\n\t waited in my private tree for application since that time.\n\t -----BEGIN PGP SIGNATURE-----\n\t \n\t iQEcBAABCgAGBQJWCtIwAAoJEMH8FHityuwJFPYH/2LJpi0yUhI01s0D9U5rZgjl\n\t 8mLP70utAMaqXiGqP/O0ndH+za5TrrUTwDJE5jhAHru1Q6q62Ld2BfOR5+K8zlrP\n\t 4UDGBDj3ePJgEtbSsJYJIRT+AKque2GONbeGpJh2arPrNamWChKIz8HoGSgwdRlx\n\t TvQuVFEa6C3ujP0ATM8x54f0vR4bYm9WmBS522DwZQY4JpGZC005A3Quw6fmFxPJ\n\t vJRo1fE1d2OZ3Cuxb15m8PLtZw6sbMdMwgyirAFGrJsN9u/V6BzsSzH0s8suT7IP\n\t WIohnmYtFSUfkQjaGrMl2wIpJSsIzettiXf9GrQDXSGZsQ4k7sW3U+qrcZ7ZUR4=\n\t =ngv1\n\t -----END PGP SIGNATURE-----\n\n\tMerge tag 'efm32-for-4.4-rc1' of git://git.pengutronix.de/git/ukl/linux into next/cleanup\n\n\tMerge \"efm32 cleanups for 4.4-rc1\" from Uwe Kleine-König:\n\n\tThese are just two followup cleanups for commits that are in v3.17-rc1 and\n\twaited in my private tree for application since that time.\n\n\t* tag 'efm32-for-4.4-rc1' of git://git.pengutronix.de/git/ukl/linux:\n\t  ARM: efm32: switch to vendor,device compatible strings\n\t  ARM: efm32: switch to properly namespaced location property\n\n\t~/gsrc/linux$ diff -u <(git cat-file commit HEAD) <(git cat-file commit 064ca93f7ab927c2752d86fc5727716e340d737c)\n\t--- /dev/fd/63\t2015-11-02 09:02:17.310373539 +0100\n\t+++ /dev/fd/62\t2015-11-02 09:02:17.310373539 +0100\n\t@@ -3,7 +3,11 @@\n\t parent f719a0d6a8541b383c506aaa4b4fa6b4109669f4\n\t author Arnd Bergmann <arnd@arndb.de> 1444139956 +0200\n\t committer Arnd Bergmann <arnd@arndb.de> 1444139956 +0200\n\t-\n\t+mergetag object f719a0d6a8541b383c506aaa4b4fa6b4109669f4\n\t+ type commit\n\t+ tag efm32-for-4.4-rc1\n\t+ tagger Uwe Kleine-König <uwe@kleine-koenig.org> 1443549594 +0200\n\t+ \n\t  efm32 cleanups for 4.4-rc1\n\t  \n\t  These are just two followup cleanups for commits that are in v3.17-rc1 and\n\t@@ -21,7 +25,7 @@\n\t \n\t Merge tag 'efm32-for-4.4-rc1' of git://git.pengutronix.de/git/ukl/linux into next/cleanup\n\t \n\t-Merge \"efm32 cleanups for 4.4-rc1\" from Uwe Kleine-König:\n\t+Merge \"efm32 cleanups for 4.4-rc1\" from Uwe Kleine-Koenig:\n\t \n\t These are just two followup cleanups for commits that are in v3.17-rc1 and\n\t waited in my private tree for application since that time.\n\nSo now the PGP-Signature also appears in the regular commit log. So\neither remove the mergetag info completely or (preferably) keep it\ncompletely if the merged parent didn't change.\n\nBest regards\nUwe\n\n-- \nPengutronix e.K.                           | Uwe Kleine-König            |\nIndustrial Linux Solutions                 | http://www.pengutronix.de/  |\n"},{"id":"272733","messageId":"56378D6F.8080508@drmicha.warpmail.net","threadId":"40706","inReplyTo":"20151102080428.GO4931@pengutronix.de","subject":"Re: git filter-branch and merging of signed tags","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2015-11-02T16:21:03Z","receivedAt":"2015-11-02T16:21:03Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Uwe Kleine-König venit, vidit, dixit 02.11.2015 09:04:\n> Hello,\n> \n> Consider I want to rewrite a commit that is a merge of a signed tag. In\n> my case that's 064ca93f7ab927c2752d86fc5727716e340d737c that currently\n> sits in linux-next:\n> \n> \t~/gsrc/linux$ git version\n> \tgit version 2.6.1\n> \t~/gsrc/linux$ git checkout 064ca93f7ab927c2752d86fc5727716e340d737c\n> \t~/gsrc/linux$ git cat-file commit HEAD\n> \ttree 7086bbd51d06ebd0e3fcca70380d0a066efce6ef\n> \tparent e44a01fa0e0aec2f3a21dadb9c030d14831d4258\n> \tparent f719a0d6a8541b383c506aaa4b4fa6b4109669f4\n> \tauthor Arnd Bergmann <arnd@arndb.de> 1444139956 +0200\n> \tcommitter Arnd Bergmann <arnd@arndb.de> 1444139956 +0200\n> \tmergetag object f719a0d6a8541b383c506aaa4b4fa6b4109669f4\n> \t type commit\n> \t tag efm32-for-4.4-rc1\n> \t tagger Uwe Kleine-König <uwe@kleine-koenig.org> 1443549594 +0200\n> \t \n> \t efm32 cleanups for 4.4-rc1\n> \t \n> \t These are just two followup cleanups for commits that are in v3.17-rc1 and\n> \t waited in my private tree for application since that time.\n> \t -----BEGIN PGP SIGNATURE-----\n> \t \n> \t iQEcBAABCgAGBQJWCtIwAAoJEMH8FHityuwJFPYH/2LJpi0yUhI01s0D9U5rZgjl\n> \t 8mLP70utAMaqXiGqP/O0ndH+za5TrrUTwDJE5jhAHru1Q6q62Ld2BfOR5+K8zlrP\n> \t 4UDGBDj3ePJgEtbSsJYJIRT+AKque2GONbeGpJh2arPrNamWChKIz8HoGSgwdRlx\n> \t TvQuVFEa6C3ujP0ATM8x54f0vR4bYm9WmBS522DwZQY4JpGZC005A3Quw6fmFxPJ\n> \t vJRo1fE1d2OZ3Cuxb15m8PLtZw6sbMdMwgyirAFGrJsN9u/V6BzsSzH0s8suT7IP\n> \t WIohnmYtFSUfkQjaGrMl2wIpJSsIzettiXf9GrQDXSGZsQ4k7sW3U+qrcZ7ZUR4=\n> \t =ngv1\n> \t -----END PGP SIGNATURE-----\n> \n> \tMerge tag 'efm32-for-4.4-rc1' of git://git.pengutronix.de/git/ukl/linux into next/cleanup\n> \n> \tMerge \"efm32 cleanups for 4.4-rc1\" from Uwe Kleine-Koenig:\n> \n> \tThese are just two followup cleanups for commits that are in v3.17-rc1 and\n> \twaited in my private tree for application since that time.\n> \n> \t* tag 'efm32-for-4.4-rc1' of git://git.pengutronix.de/git/ukl/linux:\n> \t  ARM: efm32: switch to vendor,device compatible strings\n> \t  ARM: efm32: switch to properly namespaced location property\n> \n> OK, to fix my name in the commit log I do:\n> \n> \t git filter-branch -f --msg-filter \"sed 's/Kleine-Koenig/$(echo Kleine-K+APY-nig | iconv -f utf-7 -t utf-8)/'\" HEAD ^HEAD^ ^HEAD^2\n> \n> This destroys the mergetag, as now I have:\n> \n> \t~/gsrc/linux$ git cat-file commit HEAD\n> \ttree 7086bbd51d06ebd0e3fcca70380d0a066efce6ef\n> \tparent e44a01fa0e0aec2f3a21dadb9c030d14831d4258\n> \tparent f719a0d6a8541b383c506aaa4b4fa6b4109669f4\n> \tauthor Arnd Bergmann <arnd@arndb.de> 1444139956 +0200\n> \tcommitter Arnd Bergmann <arnd@arndb.de> 1444139956 +0200\n> \n> \t efm32 cleanups for 4.4-rc1\n> \t \n> \t These are just two followup cleanups for commits that are in v3.17-rc1 and\n> \t waited in my private tree for application since that time.\n> \t -----BEGIN PGP SIGNATURE-----\n> \t \n> \t iQEcBAABCgAGBQJWCtIwAAoJEMH8FHityuwJFPYH/2LJpi0yUhI01s0D9U5rZgjl\n> \t 8mLP70utAMaqXiGqP/O0ndH+za5TrrUTwDJE5jhAHru1Q6q62Ld2BfOR5+K8zlrP\n> \t 4UDGBDj3ePJgEtbSsJYJIRT+AKque2GONbeGpJh2arPrNamWChKIz8HoGSgwdRlx\n> \t TvQuVFEa6C3ujP0ATM8x54f0vR4bYm9WmBS522DwZQY4JpGZC005A3Quw6fmFxPJ\n> \t vJRo1fE1d2OZ3Cuxb15m8PLtZw6sbMdMwgyirAFGrJsN9u/V6BzsSzH0s8suT7IP\n> \t WIohnmYtFSUfkQjaGrMl2wIpJSsIzettiXf9GrQDXSGZsQ4k7sW3U+qrcZ7ZUR4=\n> \t =ngv1\n> \t -----END PGP SIGNATURE-----\n> \n> \tMerge tag 'efm32-for-4.4-rc1' of git://git.pengutronix.de/git/ukl/linux into next/cleanup\n> \n> \tMerge \"efm32 cleanups for 4.4-rc1\" from Uwe Kleine-König:\n> \n> \tThese are just two followup cleanups for commits that are in v3.17-rc1 and\n> \twaited in my private tree for application since that time.\n> \n> \t* tag 'efm32-for-4.4-rc1' of git://git.pengutronix.de/git/ukl/linux:\n> \t  ARM: efm32: switch to vendor,device compatible strings\n> \t  ARM: efm32: switch to properly namespaced location property\n> \n> \t~/gsrc/linux$ diff -u <(git cat-file commit HEAD) <(git cat-file commit 064ca93f7ab927c2752d86fc5727716e340d737c)\n> \t--- /dev/fd/63\t2015-11-02 09:02:17.310373539 +0100\n> \t+++ /dev/fd/62\t2015-11-02 09:02:17.310373539 +0100\n> \t@@ -3,7 +3,11 @@\n> \t parent f719a0d6a8541b383c506aaa4b4fa6b4109669f4\n> \t author Arnd Bergmann <arnd@arndb.de> 1444139956 +0200\n> \t committer Arnd Bergmann <arnd@arndb.de> 1444139956 +0200\n> \t-\n> \t+mergetag object f719a0d6a8541b383c506aaa4b4fa6b4109669f4\n> \t+ type commit\n> \t+ tag efm32-for-4.4-rc1\n> \t+ tagger Uwe Kleine-König <uwe@kleine-koenig.org> 1443549594 +0200\n> \t+ \n> \t  efm32 cleanups for 4.4-rc1\n> \t  \n> \t  These are just two followup cleanups for commits that are in v3.17-rc1 and\n> \t@@ -21,7 +25,7 @@\n> \t \n> \t Merge tag 'efm32-for-4.4-rc1' of git://git.pengutronix.de/git/ukl/linux into next/cleanup\n> \t \n> \t-Merge \"efm32 cleanups for 4.4-rc1\" from Uwe Kleine-König:\n> \t+Merge \"efm32 cleanups for 4.4-rc1\" from Uwe Kleine-Koenig:\n> \t \n> \t These are just two followup cleanups for commits that are in v3.17-rc1 and\n> \t waited in my private tree for application since that time.\n> \n> So now the PGP-Signature also appears in the regular commit log. So\n> either remove the mergetag info completely or (preferably) keep it\n> completely if the merged parent didn't change.\n\nDoes your git include\na5a4b3f (filter-branch: remove multi-line headers in msg filter,\n2015-10-08)? That takes care of the incomplete header tag parsing.\n\nShould be in master by now, I think.\n\nKeeping the mergetag signature would require some extra logic in\nfilter-branch.\n\nMichael\n"},{"id":"272740","messageId":"20151102171326.GY4931@pengutronix.de","threadId":"40706","inReplyTo":"56378D6F.8080508@drmicha.warpmail.net","subject":"Re: git filter-branch and merging of signed tags","fromName":"Uwe Kleine-König","fromEmail":"u.kleine-koenig@pengutronix.de","sentAt":"2015-11-02T17:13:26Z","receivedAt":"2015-11-02T17:13:26Z","isPatch":false,"sender":{"key":"u.kleine-koenig@pengutronix.de","avatar":"https://gravatar.com/avatar/354b5e3ceb2806a2f1e1e382ac29ddbdad18288654da62b61eb13583a857eee7?d=mp&s=160"},"body":"Hello Michael,\n\nOn Mon, Nov 02, 2015 at 05:21:03PM +0100, Michael J Gruber wrote:\n> Uwe Kleine-König venit, vidit, dixit 02.11.2015 09:04:\n> > \t~/gsrc/linux$ git version\n> > \tgit version 2.6.1\n> \n> Does your git include\n> a5a4b3f (filter-branch: remove multi-line headers in msg filter,\n> 2015-10-08)? That takes care of the incomplete header tag parsing.\nNo, it does not. Thanks for the hint.\n\n> Should be in master by now, I think.\n> \n> Keeping the mergetag signature would require some extra logic in\n> filter-branch.\nthat I'd like to have :-). It seems I have to dig into that myself. (If\nsomeone is quicker than me, I promise not to be angry :-)\n\nBest regards\nUwe\n\n-- \nPengutronix e.K.                           | Uwe Kleine-König            |\nIndustrial Linux Solutions                 | http://www.pengutronix.de/  |\n"}]}