From: Andrew Deason Date: Thu, 3 Nov 2011 17:33:55 +0000 (-0500) Subject: external: trigger git commit-msg hooks on import X-Git-Tag: upstream/1.8.0_pre1^2~3093 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=fbf68f12592419a315f56585f9b8bb3a822bbc9b;p=packages%2Fo%2Fopenafs.git 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 --- 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"; } };