From fbf68f12592419a315f56585f9b8bb3a822bbc9b Mon Sep 17 00:00:00 2001 From: Andrew Deason Date: Thu, 3 Nov 2011 12:33:55 -0500 Subject: [PATCH] external: trigger git commit-msg hooks on import When we import commits, the new commit does not have a Change-Id in the commit message. Usually a git commit-msg hook will be installed to automatically insert a Change-Id into the commit message if one does not already exist, so trigger the hook by performing a no-op 'git commit --amend'. Change-Id: Ie5e83c529b83c9f3d269df6742a59e965dbc6407 Reviewed-on: http://gerrit.openafs.org/5797 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- src/external/import-external-git.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/external/import-external-git.pl b/src/external/import-external-git.pl index a3dcd42df..190be1b1a 100755 --- a/src/external/import-external-git.pl +++ b/src/external/import-external-git.pl @@ -216,6 +216,8 @@ eval { system("git rebase --whitespace=fix HEAD^") == 0 or print STDERR "WARNING: Fixing whitespace errors failed.\n"; } + system("GIT_EDITOR=true git commit --amend") == 0 + or print STDERR "WARNING: Firing commit msg hooks failed.\n"; } }; -- 2.39.5