summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 48ec125)
raw | patch | inline | side by side (parent: 48ec125)
author | Holger Weiss <holger@zedat.fu-berlin.de> | |
Sat, 7 Nov 2009 01:23:32 +0000 (02:23 +0100) | ||
committer | Holger Weiss <holger@zedat.fu-berlin.de> | |
Sat, 7 Nov 2009 01:23:32 +0000 (02:23 +0100) |
Only the author's name and address will now be mentioned in a commit
notification by default. However, if the "-C" option is specified (or
"notify.showCommitter" is set), the committer's name and address will
also be included in the notification if the committer is not the author
of the commit (as we previously did by default).
notification by default. However, if the "-C" option is specified (or
"notify.showCommitter" is set), the committer's name and address will
also be included in the notification if the committer is not the author
of the commit (as we previously did by default).
tools/git-notify | patch | blob | history |
diff --git a/tools/git-notify b/tools/git-notify
index c68ed0985361e2ce1c2d75cbee6e6a08ead96481..0031fcded01201721df31823e87046dda9921afd 100755 (executable)
--- a/tools/git-notify
+++ b/tools/git-notify
#
# Usage: git-notify [options] [--] old-sha1 new-sha1 refname
#
+# -C Show committer in the body if different from the author
# -c name Send CIA notifications under specified project name
# -m addr Send mail notifications to specified address
# -n max Set max number of individual mails to send
# configuration parameters
+# show the committer if different from the author (can be set with the -C option)
+my $show_committer = git_config( "notify.showcommitter" );
+
# base URL of the gitweb repository browser (can be set with the -u option)
my $gitweb_url = git_config( "notify.baseurl" );
sub usage()
{
print "Usage: $0 [options] [--] old-sha1 new-sha1 refname\n";
+ print " -C Show committer in the body if different from the author\n";
print " -c name Send CIA notifications under specified project name\n";
print " -m addr Send mail notifications to specified address\n";
print " -n max Set max number of individual mails to send\n";
my $arg = shift @ARGV;
if ($arg eq '--') { last; }
+ elsif ($arg eq '-C') { $show_committer = 1; }
elsif ($arg eq '-c') { $cia_project_name = shift @ARGV; }
elsif ($arg eq '-m') { $commitlist_address = shift @ARGV; }
elsif ($arg eq '-n') { $max_individual_notices = shift @ARGV; }
"Branch: $ref",
"Commit: $obj",
"Author:" . $info{"author"},
- $info{"committer"} ne $info{"author"} ? "Committer:" . $info{"committer"} : undef,
+ $show_committer && $info{"committer"} ne $info{"author"} ? "Committer:" . $info{"committer"} : undef,
"Date:" . format_date($info{"author_date"},$info{"author_tz"}),
$url ? "URL: $url" : undef),
"",