diff options
-rwxr-xr-x | git-notify | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -16,7 +16,7 @@ # | trap "rm -f '$tmpfile'" EXIT # | # | cwd="`pwd`" -# | REPO_NAME="`basename "$cwd"`" +# | REPO_NAME="`basename '$cwd'`" # | while read oldrev newrev refname; do # | echo "$oldrev $newrev $refname" >> "$tmpfile" # | done @@ -40,11 +40,20 @@ $dest_email = 'commit@commit.noreply.org'; $sendmail = '/usr/sbin/sendmail'; -die ("Usage: $0 <commit> <branch>") if (scalar @ARGV < 2); +die ("Usage: $0 <commit> <branch> <repos> [<project> [<from_email> [<dest_email>] ] ]") if (scalar @ARGV < 3); # The commit stuff my $commit = $ARGV[0]; my $branch = $ARGV[1]; my $repos = $ARGV[2]; +if (scalar @ARGV > 3) { + $project = $ARGV[3]; +} +if (scalar @ARGV > 4) { + $from_email = $ARGV[4]; +} +if (scalar @ARGV > 5) { + $dest_email = $ARGV[5]; +} open COMMIT, "git-cat-file commit $commit|" or die "git-cat-file commit $commit: $!"; my $state = 0; |