Commit 1c8d87dd authored by Robert Ricci's avatar Robert Ricci
Browse files

Add an option for 'extra' command line args to be passed to 'git show'

so that I can add '-p' (show patch) to my public repository.

Also, fixed up an existing config option that had a character
illegal for 'git config' (underscores are not allowed).
parent efded17a
...@@ -121,7 +121,13 @@ my $detach = get_config("detach",undef); ...@@ -121,7 +121,13 @@ my $detach = get_config("detach",undef);
# false, pushes of multiple commits along a branch get included in the same # false, pushes of multiple commits along a branch get included in the same
# mail. # mail.
# #
my $separate_mail = get_config("separate_mail",undef); my $separate_mail = get_config("separatemail",undef);
#
# If set, these arguments will be passed *in addition* to the regular arguments
# to 'git show' to produce descriptions of commits
#
my $showcommit_extra = get_config("showcommitextra",undef);
###################################################################### ######################################################################
# Constants # Constants
...@@ -510,8 +516,13 @@ sub commit_mail($$$@) { ...@@ -510,8 +516,13 @@ sub commit_mail($$$@) {
# Just use regular git show command, with purty +/- summary at the # Just use regular git show command, with purty +/- summary at the
# bottom (formatted to be narrow enough for email) # bottom (formatted to be narrow enough for email)
# #
debug("running '$GIT show --numstat --shortstat '$rev''"); my $showcommand = "$GIT show --numstat --shortstat ";
my @body = `$GIT show --numstat --shortstat $rev`; if (defined($showcommit_extra)) {
$showcommand .= "$showcommit_extra ";
}
$showcommand .= "'$rev'";
debug("running '$showcommand'");
my @body = `$showcommand`;
if ($separate_mail) { if ($separate_mail) {
# Send this message by itself # Send this message by itself
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment