From 2ef580550460f377af895b09f5870424c0cff8fa Mon Sep 17 00:00:00 2001 From: Quy Tonthat Date: Thu, 28 Dec 2006 01:16:21 +1100 Subject: [PATCH 1/5] git-send-email: default value for "From:" field. If user hits enter at the prompt for "Who should the emails appear to be from?", the value for "From:" field was emptied instead of GIT_COMMITER_IDENT. Signed-off-by: Quy Tonthat Signed-off-by: Junio C Hamano --- git-send-email.perl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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++; } From ccdfdea08db398fca1580a970c0d283affa5343f Mon Sep 17 00:00:00 2001 From: Robert Fitzsimons Date: Wed, 27 Dec 2006 14:22:21 +0000 Subject: [PATCH 2/5] gitweb: Re-enable rev-list --parents for parse_commit. Re-enable rev-list --parents for parse_commit which was removed in (208b2dff95bb48682c351099023a1cbb0e1edf26). rev-list --parents is not just used to return the parent headers in the commit object, it includes any grafts which are vaild for the commit. Signed-off-by: Robert Fitzsimons Signed-off-by: Junio C Hamano --- gitweb/gitweb.perl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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; From a3c11db9ecf5c2a1ec1b25ba809cecb3747750d4 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 27 Dec 2006 14:23:21 -0800 Subject: [PATCH 3/5] Use 'repack -a -d -l' instead of 'repack -a -d' in git-gc Otherwise we would end up slurping objects we borrow from alternates. Signed-off-by: Junio C Hamano --- git-gc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-gc.sh b/git-gc.sh index e55ed19fbd..6de55f7292 100755 --- a/git-gc.sh +++ b/git-gc.sh @@ -10,6 +10,6 @@ SUBDIRECTORY_OK=Yes git-pack-refs --prune && git-reflog expire --all && -git-repack -a -d && +git-repack -a -d -l && git-prune && git-rerere gc || exit From 87ac1390d9ac2ab5e495b543caee12221a773fb7 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 27 Dec 2006 15:12:31 -0800 Subject: [PATCH 4/5] Set NO_MMAP for Cygwin by default This should not be necessary for people who only use NTFS, but for people with FAT32 it seems to be an issue. Let's ship with a safer default. Signed-off-by: Junio C Hamano --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 52d4a3a86a..f862170b1f 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 From bbfc63dd78037a3f94c3f342384caee1037d09ab Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 27 Dec 2006 14:17:35 -0800 Subject: [PATCH 5/5] gcc does not necessarily pass runtime libpath with -R Signed-off-by: Junio C Hamano --- Makefile | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 775ffaac27..22b8a378c6 100644 --- a/Makefile +++ b/Makefile @@ -79,6 +79,10 @@ all: # # Define NO_ICONV if your libc does not properly support iconv. # +# Define NO_R_TO_GCC if your gcc does not like "-R/path/lib" that +# tells runtime paths to dynamic libraries; "-Wl,-rpath=/path/lib" +# is used instead. +# # Define USE_NSEC below if you want git to care about sub-second file mtimes # and ctimes. Note that you need recent glibc (at least 2.2.4) for this, and # it will BREAK YOUR LOCAL DIFFS! show-diff and anything using it will likely @@ -422,11 +426,19 @@ ifeq ($(uname_S),Darwin) endif endif +ifdef NO_R_TO_GCC_LINKER + # Some gcc does not accept and pass -R to the linker to specify + # the runtime dynamic library path. + CC_LD_DYNPATH = -Wl,-rpath= +else + CC_LD_DYNPATH = -R +endif + ifndef NO_CURL ifdef CURLDIR - # This is still problematic -- gcc does not always want -R. + # Try "-Wl,-rpath=$(CURLDIR)/lib" in such a case. BASIC_CFLAGS += -I$(CURLDIR)/include - CURL_LIBCURL = -L$(CURLDIR)/lib -R$(CURLDIR)/lib -lcurl + CURL_LIBCURL = -L$(CURLDIR)/lib $(CC_LD_DYNPATH)$(CURLDIR)/lib -lcurl else CURL_LIBCURL = -lcurl endif @@ -445,9 +457,8 @@ endif ifndef NO_OPENSSL OPENSSL_LIBSSL = -lssl ifdef OPENSSLDIR - # Again this may be problematic -- gcc does not always want -R. BASIC_CFLAGS += -I$(OPENSSLDIR)/include - OPENSSL_LINK = -L$(OPENSSLDIR)/lib -R$(OPENSSLDIR)/lib + OPENSSL_LINK = -L$(OPENSSLDIR)/lib $(CC_LD_DYNPATH)$(OPENSSLDIR)/lib else OPENSSL_LINK = endif @@ -463,9 +474,8 @@ else endif ifdef NEEDS_LIBICONV ifdef ICONVDIR - # Again this may be problematic -- gcc does not always want -R. BASIC_CFLAGS += -I$(ICONVDIR)/include - ICONV_LINK = -L$(ICONVDIR)/lib -R$(ICONVDIR)/lib + ICONV_LINK = -L$(ICONVDIR)/lib $(CC_LD_DYNPATH)$(ICONVDIR)/lib else ICONV_LINK = endif