diff options
author | Holger Weiss <holger@zedat.fu-berlin.de> | 2013-10-03 22:37:44 (GMT) |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2013-10-03 22:37:44 (GMT) |
commit | 588ae809287c6c02e53fb0227bc3c4c6239d4561 (patch) | |
tree | cb5fbfee890861df73d80d640224d47c09ac904e /libexec | |
parent | 02fc9f14f76f8fb767c4ef0e1dc59676d0678c20 (diff) | |
download | site-588ae809287c6c02e53fb0227bc3c4c6239d4561.tar.gz |
git-notify: Replace "-S" with "-G"
Before:
-S Enable compatibility with SourceForge's gitweb URLs
After:
-G Don't append .git extension to repository names in gitweb URLs
The new option behaves like the old one, this change should just clarify
that this is not specific to SourceForge.
Diffstat (limited to 'libexec')
-rwxr-xr-x | libexec/git-notify | 10 | ||||
-rwxr-xr-x | libexec/post-receive.d/01-mail-notify | 1 |
2 files changed, 6 insertions, 5 deletions
diff --git a/libexec/git-notify b/libexec/git-notify index 60d91ae..cce476e 100755 --- a/libexec/git-notify +++ b/libexec/git-notify | |||
@@ -77,8 +77,8 @@ my $abbreviate_url = git_config( "notify.shorturls" ); | |||
77 | # don't report merge commits (can be set with the -X option) | 77 | # don't report merge commits (can be set with the -X option) |
78 | my $ignore_merges = git_config( "notify.ignoremerges" ); | 78 | my $ignore_merges = git_config( "notify.ignoremerges" ); |
79 | 79 | ||
80 | # enable compatibility with SourceForge's gitweb (can be set with the -S option) | 80 | # don't append ".git" to repository name in gitweb URLs (can be set with the -G option) |
81 | my $sourceforge = git_config( "notify.sourceforge" ); | 81 | my $no_git_extension = git_config( "notify.nogitextension" ); |
82 | 82 | ||
83 | # default repository name (can be changed with the -r option) | 83 | # default repository name (can be changed with the -r option) |
84 | my $repos_name = git_config( "notify.repository" ) || get_repos_name(); | 84 | my $repos_name = git_config( "notify.repository" ) || get_repos_name(); |
@@ -113,10 +113,10 @@ sub usage() | |||
113 | print " -A Omit the author name from the mail subject\n"; | 113 | print " -A Omit the author name from the mail subject\n"; |
114 | print " -C Show committer in the body if different from the author\n"; | 114 | print " -C Show committer in the body if different from the author\n"; |
115 | print " -c name Send CIA notifications under specified project name\n"; | 115 | print " -c name Send CIA notifications under specified project name\n"; |
116 | print " -G Don't append .git extension to repository names in gitweb URLs\n"; | ||
116 | print " -m addr Send mail notifications to specified address\n"; | 117 | print " -m addr Send mail notifications to specified address\n"; |
117 | print " -n max Set max number of individual mails to send\n"; | 118 | print " -n max Set max number of individual mails to send\n"; |
118 | print " -r name Set the git repository name\n"; | 119 | print " -r name Set the git repository name\n"; |
119 | print " -S Enable compatibility with SourceForge's gitweb URLs\n"; | ||
120 | print " -s bytes Set the maximum diff size in bytes (-1 for no limit)\n"; | 120 | print " -s bytes Set the maximum diff size in bytes (-1 for no limit)\n"; |
121 | print " -T Prefix the mail subject with a [repository name] tag\n"; | 121 | print " -T Prefix the mail subject with a [repository name] tag\n"; |
122 | print " -t file Prevent duplicate notifications by saving state to this file\n"; | 122 | print " -t file Prevent duplicate notifications by saving state to this file\n"; |
@@ -302,10 +302,10 @@ sub parse_options() | |||
302 | elsif ($arg eq '-A') { $omit_author = 1; } | 302 | elsif ($arg eq '-A') { $omit_author = 1; } |
303 | elsif ($arg eq '-C') { $show_committer = 1; } | 303 | elsif ($arg eq '-C') { $show_committer = 1; } |
304 | elsif ($arg eq '-c') { $cia_project_name = shift @ARGV; } | 304 | elsif ($arg eq '-c') { $cia_project_name = shift @ARGV; } |
305 | elsif ($arg eq '-G') { $no_git_extension = 1; } | ||
305 | elsif ($arg eq '-m') { $commitlist_address = shift @ARGV; } | 306 | elsif ($arg eq '-m') { $commitlist_address = shift @ARGV; } |
306 | elsif ($arg eq '-n') { $max_individual_notices = shift @ARGV; } | 307 | elsif ($arg eq '-n') { $max_individual_notices = shift @ARGV; } |
307 | elsif ($arg eq '-r') { $repos_name = shift @ARGV; } | 308 | elsif ($arg eq '-r') { $repos_name = shift @ARGV; } |
308 | elsif ($arg eq '-S') { $sourceforge = 1; } | ||
309 | elsif ($arg eq '-s') { $max_diff_size = shift @ARGV; } | 309 | elsif ($arg eq '-s') { $max_diff_size = shift @ARGV; } |
310 | elsif ($arg eq '-T') { $emit_repo = 1; } | 310 | elsif ($arg eq '-T') { $emit_repo = 1; } |
311 | elsif ($arg eq '-t') { $state_file = shift @ARGV; } | 311 | elsif ($arg eq '-t') { $state_file = shift @ARGV; } |
@@ -662,7 +662,7 @@ umask( $mode_mask ); | |||
662 | 662 | ||
663 | # append repository path to URL | 663 | # append repository path to URL |
664 | if ($gitweb_url) { | 664 | if ($gitweb_url) { |
665 | $gitweb_url .= $sourceforge ? "/$repos_name" : "/$repos_name.git"; | 665 | $gitweb_url .= $no_git_extension ? "/$repos_name" : "/$repos_name.git"; |
666 | } | 666 | } |
667 | 667 | ||
668 | if (@ARGV) | 668 | if (@ARGV) |
diff --git a/libexec/post-receive.d/01-mail-notify b/libexec/post-receive.d/01-mail-notify index f3b4e77..d9ef967 100755 --- a/libexec/post-receive.d/01-mail-notify +++ b/libexec/post-receive.d/01-mail-notify | |||
@@ -36,5 +36,6 @@ exec "$gitnotify" \ | |||
36 | -u "$gitweburl" \ | 36 | -u "$gitweburl" \ |
37 | -A \ | 37 | -A \ |
38 | -C \ | 38 | -C \ |
39 | -G \ | ||
39 | -T \ | 40 | -T \ |
40 | -z | 41 | -z |