summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rwxr-xr-xgit-send-email.perl5
-rwxr-xr-xgitweb/gitweb.perl10
3 files changed, 9 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index 12f4bd22e7..775ffaac27 100644
--- a/Makefile
+++ b/Makefile
@@ -360,8 +360,8 @@ ifeq ($(uname_O),Cygwin)
NO_FAST_WORKING_DIRECTORY = UnfortunatelyYes
# There are conflicting reports about this.
# On some boxes NO_MMAP is needed, and not so elsewhere.
- # Try uncommenting this if you see things break -- YMMV.
- # NO_MMAP = YesPlease
+ # Try commenting this out if you suspect MMAP is more efficient
+ NO_MMAP = YesPlease
NO_IPV6 = YesPlease
X = .exe
endif
diff --git a/git-send-email.perl b/git-send-email.perl
index 4c87c20c15..ba39d39384 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -178,11 +178,10 @@ my $prompting = 0;
if (!defined $from) {
$from = $author || $committer;
do {
- $_ = $term->readline("Who should the emails appear to be from? ",
- $from);
+ $_ = $term->readline("Who should the emails appear to be from? [$from] ");
} while (!defined $_);
- $from = $_;
+ $from = $_ if ($_);
print "Emails will be sent from: ", $from, "\n";
$prompting++;
}
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 65fcdb0f28..da12be7472 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -1271,7 +1271,7 @@ sub parse_tag {
}
sub parse_commit_text {
- my ($commit_text) = @_;
+ my ($commit_text, $withparents) = @_;
my @commit_lines = split '\n', $commit_text;
my %co;
@@ -1281,13 +1281,12 @@ sub parse_commit_text {
if (!($header =~ m/^[0-9a-fA-F]{40}/)) {
return;
}
- $co{'id'} = $header;
- my @parents;
+ ($co{'id'}, my @parents) = split ' ', $header;
while (my $line = shift @commit_lines) {
last if $line eq "\n";
if ($line =~ m/^tree ([0-9a-fA-F]{40})$/) {
$co{'tree'} = $1;
- } elsif ($line =~ m/^parent ([0-9a-fA-F]{40})$/) {
+ } elsif ((!defined $withparents) && ($line =~ m/^parent ([0-9a-fA-F]{40})$/)) {
push @parents, $1;
} elsif ($line =~ m/^author (.*) ([0-9]+) (.*)$/) {
$co{'author'} = $1;
@@ -1373,12 +1372,13 @@ sub parse_commit {
local $/ = "\0";
open my $fd, "-|", git_cmd(), "rev-list",
+ "--parents",
"--header",
"--max-count=1",
$commit_id,
"--",
or die_error(undef, "Open git-rev-list failed");
- %co = parse_commit_text(<$fd>);
+ %co = parse_commit_text(<$fd>, 1);
close $fd;
return %co;