aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-05-11 15:30:13 +1000
committerQt Continuous Integration System <qt-info@nokia.com>2011-05-11 15:30:13 +1000
commit0d7c262847bbe793bd5c876fef93c865a3c9b7f1 (patch)
treed8585e73935cffb52e61db834b8d7a6eb452aaaa
parente4a61858d9360fc522d9585ed69d9cb659188265 (diff)
parente36ef7a76e4cff5523a3362fd74b6cc6dc0ca072 (diff)
Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qt5-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qt5-staging: Add commit-template support
-rw-r--r--.commit-template10
-rwxr-xr-xinit-repository11
2 files changed, 21 insertions, 0 deletions
diff --git a/.commit-template b/.commit-template
new file mode 100644
index 00000000..589ca895
--- /dev/null
+++ b/.commit-template
@@ -0,0 +1,10 @@
+# ===[ Subject ]==========[ one line, please wrap at 72 characters ]===|
+
+# ---[ Details ]---------[ remember extra blank line after subject ]---|
+
+# ---[ Fields ]-----------------[ uncomment and edit as applicable ]---|
+
+#Task-number:
+#Reviewed-by:
+
+# ==================================[ please wrap at 72 characters ]===|
diff --git a/init-repository b/init-repository
index 92ba994f..252fbb12 100755
--- a/init-repository
+++ b/init-repository
@@ -180,6 +180,7 @@ use Carp qw( confess );
use English qw( -no_match_vars );
use Getopt::Long qw( GetOptionsFromArray );
use Pod::Usage qw( pod2usage );
+use Cwd qw( getcwd );
my %PROTOCOLS = (
'internal' => 'git://scm.dev.nokia.troll.no/' ,
@@ -332,6 +333,11 @@ sub git_submodule_init
}
$self->exe('git', 'submodule', 'init', @init_args);
+ my $template = getcwd()."/.commit-template";
+ if (-e $template) {
+ $self->exe('git', 'config', 'commit.template', $template);
+ }
+
return;
}
@@ -478,6 +484,11 @@ sub git_clone_one_submodule
$self->exe('git', 'fetch', ($mirror ? $mirror : $url));
}
+ my $template = getcwd()."/../.commit-template";
+ if (-e $template) {
+ $self->exe('git', 'config', 'commit.template', $template);
+ }
+
if ($mirror) {
$self->exe('git', 'config', 'remote.origin.url', $url);