From 1965efb1599f59b8e3380335d1fa395e2008a30b Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sun, 1 Oct 2006 03:08:55 -0700 Subject: [PATCH 1/5] GIT 1.4.3-rc1 Signed-off-by: Junio C Hamano --- GIT-VERSION-GEN | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index 14923c973b..0cacac38fc 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -1,7 +1,7 @@ #!/bin/sh GVF=GIT-VERSION-FILE -DEF_VER=v1.4.2.GIT +DEF_VER=v1.4.3.GIT LF=' ' From 7c2738cefb07e6549cafa42d1d383a3bb54ed0f3 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sun, 1 Oct 2006 21:41:46 -0700 Subject: [PATCH 2/5] Makefile: install and clean merge-recur, still. We advertised git-merge-recur for some time, and we planned to support it for one release after we made it the 'recursive'. However we forgot to install it nor have "make clean" clean it. Signed-off-by: Junio C Hamano --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index dd33158529..401b893bfa 100644 --- a/Makefile +++ b/Makefile @@ -215,7 +215,8 @@ BUILT_INS = \ $(patsubst builtin-%.o,git-%$X,$(BUILTIN_OBJS)) # what 'all' will build and 'install' will install, in gitexecdir -ALL_PROGRAMS = $(PROGRAMS) $(SIMPLE_PROGRAMS) $(SCRIPTS) +ALL_PROGRAMS = $(PROGRAMS) $(SIMPLE_PROGRAMS) $(SCRIPTS) \ + git-merge-recur$X # Backward compatibility -- to be removed after 1.0 PROGRAMS += git-ssh-pull$X git-ssh-push$X @@ -586,8 +587,7 @@ export prefix TAR INSTALL DESTDIR SHELL_PATH template_dir ### Build rules -all: $(ALL_PROGRAMS) $(BUILT_INS) git$X gitk gitweb/gitweb.cgi \ - git-merge-recur$X +all: $(ALL_PROGRAMS) $(BUILT_INS) git$X gitk gitweb/gitweb.cgi all: perl/Makefile $(MAKE) -C perl From 4fddf5798d8a0eb112c60a05272a2d9407eafc8f Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sun, 1 Oct 2006 22:22:07 -0700 Subject: [PATCH 3/5] git-mv: invalidate the removed path properly in cache-tree The command updated the cache without invalidating the cache tree entries while removing an existing entry. Signed-off-by: Junio C Hamano --- builtin-mv.c | 1 + t/t7001-mv.sh | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/builtin-mv.c b/builtin-mv.c index ff882bec47..6b0ab8aa9f 100644 --- a/builtin-mv.c +++ b/builtin-mv.c @@ -278,6 +278,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix) for (i = 0; i < deleted.nr; i++) { const char *path = deleted.items[i].path; remove_file_from_cache(path); + cache_tree_invalidate_path(active_cache_tree, path); } if (active_cache_changed) { diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh index b7fcdb390c..23a1eff3bb 100755 --- a/t/t7001-mv.sh +++ b/t/t7001-mv.sh @@ -86,4 +86,23 @@ test_expect_success \ 'move into "."' \ 'git-mv path1/path2/ .' +test_expect_success "Michael Cassar's test case" ' + rm -fr .git papers partA && + git init-db && + mkdir -p papers/unsorted papers/all-papers partA && + echo a > papers/unsorted/Thesis.pdf && + echo b > partA/outline.txt && + echo c > papers/unsorted/_another && + git add papers partA && + T1=`git write-tree` && + + git mv papers/unsorted/Thesis.pdf papers/all-papers/moo-blah.pdf && + + T=`git write-tree` && + git ls-tree -r $T | grep partA/outline.txt || { + git ls-tree -r $T + (exit 1) + } +' + test_done From 6fe5b7ff6cafcc94415deba2f3d611770d8e6b1e Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Mon, 2 Oct 2006 00:43:52 -0700 Subject: [PATCH 4/5] git-push: .git/remotes/ file does not require SP after colon Although most people would have one after colon if only for readability, we never required it in git-parse-remote, so let's not require one only in git-push. Signed-off-by: Junio C Hamano --- builtin-push.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/builtin-push.c b/builtin-push.c index 53bc378f73..273b27dcea 100644 --- a/builtin-push.c +++ b/builtin-push.c @@ -80,12 +80,12 @@ static int get_remotes_uri(const char *repo, const char *uri[MAX_URI]) int is_refspec; char *s, *p; - if (!strncmp("URL: ", buffer, 5)) { + if (!strncmp("URL:", buffer, 4)) { is_refspec = 0; - s = buffer + 5; - } else if (!strncmp("Push: ", buffer, 6)) { + s = buffer + 4; + } else if (!strncmp("Push:", buffer, 5)) { is_refspec = 1; - s = buffer + 6; + s = buffer + 5; } else continue; From 9e756904d05a53f1f519492ea1addc3e3163c678 Mon Sep 17 00:00:00 2001 From: Martin Waitz Date: Sun, 1 Oct 2006 23:57:48 +0200 Subject: [PATCH 5/5] gitweb: start to generate PATH_INFO URLs. Instead of providing the project as a ?p= parameter it is simply appended to the base URI. All other parameters are appended to that, except for ?a=summary which is the default and can be omitted. The this can be enabled with the "pathinfo" feature in gitweb_config.perl. [jc: let's introduce new features disabled by default not to upset too many existing installations.] Signed-off-by: Martin Waitz Signed-off-by: Junio C Hamano --- gitweb/gitweb.perl | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 44991b1538..10e803a97f 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -102,6 +102,10 @@ our %feature = ( 'sub' => \&feature_pickaxe, 'override' => 0, 'default' => [1]}, + + 'pathinfo' => { + 'override' => 0, + 'default' => [0]}, ); sub gitweb_check_feature { @@ -375,6 +379,7 @@ exit; sub href(%) { my %params = @_; + my $href = $my_uri; my @mapping = ( project => "p", @@ -393,6 +398,19 @@ sub href(%) { $params{'project'} = $project unless exists $params{'project'}; + my ($use_pathinfo) = gitweb_check_feature('pathinfo'); + if ($use_pathinfo) { + # use PATH_INFO for project name + $href .= "/$params{'project'}" if defined $params{'project'}; + delete $params{'project'}; + + # Summary just uses the project path URL + if (defined $params{'action'} && $params{'action'} eq 'summary') { + delete $params{'action'}; + } + } + + # now encode the parameters explicitly my @result = (); for (my $i = 0; $i < @mapping; $i += 2) { my ($name, $symbol) = ($mapping[$i], $mapping[$i+1]); @@ -400,7 +418,9 @@ sub href(%) { push @result, $symbol . "=" . esc_param($params{$name}); } } - return "$my_uri?" . join(';', @result); + $href .= "?" . join(';', @result) if scalar @result; + + return $href; }