diff options
-rwxr-xr-x | tools/git-notify | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/git-notify b/tools/git-notify index 68456fb5..97bd2ada 100755 --- a/tools/git-notify +++ b/tools/git-notify | |||
@@ -78,6 +78,9 @@ my @exclude_list = split /\s+/, git_config( "notify.exclude" ) || ""; | |||
78 | # the state file we use (can be changed with the -t option) | 78 | # the state file we use (can be changed with the -t option) |
79 | my $state_file = git_config( "notify.statefile" ) || "/var/tmp/git-notify.state"; | 79 | my $state_file = git_config( "notify.statefile" ) || "/var/tmp/git-notify.state"; |
80 | 80 | ||
81 | # umask for creating the state file (can be set with -U option) | ||
82 | my $mode_mask = git_config( "notify.umask" ) || 002; | ||
83 | |||
81 | # Extra options to git rev-list | 84 | # Extra options to git rev-list |
82 | my @revlist_options; | 85 | my @revlist_options; |
83 | 86 | ||
@@ -91,6 +94,7 @@ sub usage() | |||
91 | print " -s bytes Set the maximum diff size in bytes (-1 for no limit)\n"; | 94 | print " -s bytes Set the maximum diff size in bytes (-1 for no limit)\n"; |
92 | print " -t file Set the file to use for reading and saving state\n"; | 95 | print " -t file Set the file to use for reading and saving state\n"; |
93 | print " -u url Set the URL to the gitweb browser\n"; | 96 | print " -u url Set the URL to the gitweb browser\n"; |
97 | print " -U mask Set the umask for creatung the state file\n"; | ||
94 | print " -i branch If at least one -i is given, report only for specified branches\n"; | 98 | print " -i branch If at least one -i is given, report only for specified branches\n"; |
95 | print " -x branch Exclude changes to the specified branch from reports\n"; | 99 | print " -x branch Exclude changes to the specified branch from reports\n"; |
96 | print " -X Exclude merge commits\n"; | 100 | print " -X Exclude merge commits\n"; |
@@ -270,6 +274,7 @@ sub parse_options() | |||
270 | elsif ($arg eq '-s') { $max_diff_size = shift @ARGV; } | 274 | elsif ($arg eq '-s') { $max_diff_size = shift @ARGV; } |
271 | elsif ($arg eq '-t') { $state_file = shift @ARGV; } | 275 | elsif ($arg eq '-t') { $state_file = shift @ARGV; } |
272 | elsif ($arg eq '-u') { $gitweb_url = shift @ARGV; } | 276 | elsif ($arg eq '-u') { $gitweb_url = shift @ARGV; } |
277 | elsif ($arg eq '-U') { $mode_mask = shift @ARGV; } | ||
273 | elsif ($arg eq '-i') { push @include_list, shift @ARGV; } | 278 | elsif ($arg eq '-i') { push @include_list, shift @ARGV; } |
274 | elsif ($arg eq '-x') { push @exclude_list, shift @ARGV; } | 279 | elsif ($arg eq '-x') { push @exclude_list, shift @ARGV; } |
275 | elsif ($arg eq '-X') { push @revlist_options, "--no-merges"; } | 280 | elsif ($arg eq '-X') { push @revlist_options, "--no-merges"; } |
@@ -562,6 +567,8 @@ sub send_all_notices($$$) | |||
562 | 567 | ||
563 | parse_options(); | 568 | parse_options(); |
564 | 569 | ||
570 | umask( $mode_mask ); | ||
571 | |||
565 | # append repository path to URL | 572 | # append repository path to URL |
566 | $gitweb_url .= "/$repos_name.git" if $gitweb_url; | 573 | $gitweb_url .= "/$repos_name.git" if $gitweb_url; |
567 | 574 | ||