From e88ee2915493213ea0d0be64c542c090fefd4b33 Mon Sep 17 00:00:00 2001 From: Martin Waitz Date: Tue, 10 Oct 2006 21:16:25 +0200 Subject: [PATCH 1/5] paginate git-diff by default --- git.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git.c b/git.c index d7103a4086..e089b53571 100644 --- a/git.c +++ b/git.c @@ -226,7 +226,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 }, From 9861718b305a672f3d17936ea6a6cbd9d9a70059 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Tue, 10 Oct 2006 22:29:02 -0700 Subject: [PATCH 2/5] git-fetch --update-head-ok typofix Martin Waitz noticed that one of the case arms had an impossible choice. It turns out that what it was checking was redundant and the typo did not have any effect. Signed-off-by: Junio C Hamano --- git-fetch.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/git-fetch.sh b/git-fetch.sh index f1522bd49a..79222fbb1a 100755 --- a/git-fetch.sh +++ b/git-fetch.sh @@ -436,10 +436,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 From a057f806674f691f1640d33df14de8de8a3d4c87 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Tue, 10 Oct 2006 23:00:29 -0700 Subject: [PATCH 3/5] git-pull: we say commit X, not X commit. Signed-off-by: Junio C Hamano --- git-pull.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-pull.sh b/git-pull.sh index f380437997..ed04e7d8d8 100755 --- a/git-pull.sh +++ b/git-pull.sh @@ -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. From 0503f9c178c36a19e1f8e8930b367db0f58ce5ca Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 11 Oct 2006 07:57:17 +0000 Subject: [PATCH 4/5] git.spec.in: perl subpackage is installed in perl_vendorlib not vendorarch Signed-off-by: Junio C Hamano --- git.spec.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git.spec.in b/git.spec.in index 6d900342e3..9b1217ac3f 100644 --- a/git.spec.in +++ b/git.spec.in @@ -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 From 6130259c30695d8a6ceda414a7d0d14183491e82 Mon Sep 17 00:00:00 2001 From: Matthew Wilcox Date: Tue, 10 Oct 2006 08:58:23 -0600 Subject: [PATCH 5/5] Add --dry-run option to git-send-email Add a --dry-run option to git-send-email due to having made too many mistakes with it in the past week. I like having a safety catch on my machine gun. Signed-off-by: Matthew @ilcox Signed-off-by: Junio C Hamano --- git-send-email.perl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/git-send-email.perl b/git-send-email.perl index 3f50abaeb6..04c8942252 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -87,7 +87,8 @@ my (@to,@cc,@initial_cc,@bcclist, $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 @@ -423,7 +425,9 @@ X-Mailer: git-send-email $gitversion $header .= "References: $references\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) {