mirror of
https://github.com/git/git.git
synced 2026-03-16 03:30:08 +01:00
Merge branch 'mw/send-email' into next
* mw/send-email: Add --dry-run option to git-send-email git.spec.in: perl subpackage is installed in perl_vendorlib not vendorarch git-pull: we say commit X, not X commit. git-fetch --update-head-ok typofix paginate git-diff by default
This commit is contained in:
@@ -445,10 +445,10 @@ esac
|
||||
|
||||
# If the original head was empty (i.e. no "master" yet), or
|
||||
# if we were told not to worry, we do not have to check.
|
||||
case ",$update_head_ok,$orig_head," in
|
||||
*,, | t,* )
|
||||
case "$orig_head" in
|
||||
'')
|
||||
;;
|
||||
*)
|
||||
?*)
|
||||
curr_head=$(git-rev-parse --verify HEAD 2>/dev/null)
|
||||
if test "$curr_head" != "$orig_head"
|
||||
then
|
||||
|
||||
@@ -58,7 +58,7 @@ then
|
||||
|
||||
echo >&2 "Warning: fetch updated the current branch head."
|
||||
echo >&2 "Warning: fast forwarding your working tree from"
|
||||
echo >&2 "Warning: $orig_head commit."
|
||||
echo >&2 "Warning: commit $orig_head."
|
||||
git-update-index --refresh 2>/dev/null
|
||||
git-read-tree -u -m "$orig_head" "$curr_head" ||
|
||||
die 'Cannot fast-forward your working tree.
|
||||
|
||||
@@ -87,7 +87,8 @@ my (@to,@cc,@initial_cc,@bcclist,@xh,
|
||||
$initial_reply_to,$initial_subject,@files,$from,$compose,$time);
|
||||
|
||||
# Behavior modification variables
|
||||
my ($chain_reply_to, $quiet, $suppress_from, $no_signed_off_cc) = (1, 0, 0, 0);
|
||||
my ($chain_reply_to, $quiet, $suppress_from, $no_signed_off_cc,
|
||||
$dry_run) = (1, 0, 0, 0, 0);
|
||||
my $smtp_server;
|
||||
|
||||
# Example reply to:
|
||||
@@ -116,6 +117,7 @@ my $rc = GetOptions("from=s" => \$from,
|
||||
"quiet" => \$quiet,
|
||||
"suppress-from" => \$suppress_from,
|
||||
"no-signed-off-cc|no-signed-off-by-cc" => \$no_signed_off_cc,
|
||||
"dry-run" => \$dry_run,
|
||||
);
|
||||
|
||||
# Verify the user input
|
||||
@@ -431,7 +433,9 @@ X-Mailer: git-send-email $gitversion
|
||||
$header .= join("\n", @xh) . "\n";
|
||||
}
|
||||
|
||||
if ($smtp_server =~ m#^/#) {
|
||||
if ($dry_run) {
|
||||
# We don't want to send the email.
|
||||
} elsif ($smtp_server =~ m#^/#) {
|
||||
my $pid = open my $sm, '|-';
|
||||
defined $pid or die $!;
|
||||
if (!$pid) {
|
||||
|
||||
2
git.c
2
git.c
@@ -227,7 +227,7 @@ static void handle_internal_command(int argc, const char **argv, char **envp)
|
||||
{ "check-ref-format", cmd_check_ref_format },
|
||||
{ "commit-tree", cmd_commit_tree, RUN_SETUP },
|
||||
{ "count-objects", cmd_count_objects, RUN_SETUP },
|
||||
{ "diff", cmd_diff, RUN_SETUP },
|
||||
{ "diff", cmd_diff, RUN_SETUP | USE_PAGER },
|
||||
{ "diff-files", cmd_diff_files, RUN_SETUP },
|
||||
{ "diff-index", cmd_diff_index, RUN_SETUP },
|
||||
{ "diff-stages", cmd_diff_stages, RUN_SETUP },
|
||||
|
||||
@@ -97,7 +97,7 @@ find $RPM_BUILD_ROOT -type f -name '*.bs' -empty -exec rm -f {} ';'
|
||||
find $RPM_BUILD_ROOT -type f -name perllocal.pod -exec rm -f {} ';'
|
||||
|
||||
(find $RPM_BUILD_ROOT%{_bindir} -type f | grep -vE "arch|svn|cvs|email|gitk" | sed -e s@^$RPM_BUILD_ROOT@@) > bin-man-doc-files
|
||||
(find $RPM_BUILD_ROOT%{perl_vendorarch} -type f | sed -e s@^$RPM_BUILD_ROOT@@) >> perl-files
|
||||
(find $RPM_BUILD_ROOT%{perl_vendorlib} -type f | sed -e s@^$RPM_BUILD_ROOT@@) >> perl-files
|
||||
%if %{!?_without_docs:1}0
|
||||
(find $RPM_BUILD_ROOT%{_mandir} $RPM_BUILD_ROOT/Documentation -type f | grep -vE "arch|svn|git-cvs|email|gitk" | sed -e s@^$RPM_BUILD_ROOT@@ -e 's/$/*/' ) >> bin-man-doc-files
|
||||
%else
|
||||
|
||||
Reference in New Issue
Block a user