From 63b76948e1d211ad4a95c3a9c7a0087fe6a1e371 Mon Sep 17 00:00:00 2001 From: Stephen Boyd Date: Thu, 17 Dec 2009 16:05:28 -0800 Subject: [PATCH 01/19] api-strbuf.txt: fix typos and document launch_editor() Signed-off-by: Stephen Boyd Signed-off-by: Junio C Hamano --- Documentation/technical/api-strbuf.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Documentation/technical/api-strbuf.txt b/Documentation/technical/api-strbuf.txt index 7438149249..a0e0f850f8 100644 --- a/Documentation/technical/api-strbuf.txt +++ b/Documentation/technical/api-strbuf.txt @@ -12,7 +12,7 @@ strbuf API actually relies on the string being free of NULs. strbufs has some invariants that are very important to keep in mind: -. The `buf` member is never NULL, so you it can be used in any usual C +. The `buf` member is never NULL, so it can be used in any usual C string operations safely. strbuf's _have_ to be initialized either by `strbuf_init()` or by `= STRBUF_INIT` before the invariants, though. + @@ -55,7 +55,7 @@ Data structures * `struct strbuf` -This is string buffer structure. The `len` member can be used to +This is the string buffer structure. The `len` member can be used to determine the current length of the string, and `buf` member provides access to the string itself. @@ -253,3 +253,9 @@ same behaviour as well. comments are considered contents to be removed or not. `launch_editor`:: + + Launch the user preferred editor to edit a file and fill the buffer + with the file's contents upon the user completing their editing. The + third argument can be used to set the environment which the editor is + run in. If the buffer is NULL the editor is launched as usual but the + file's contents are not read into the buffer upon completion. From afab0fe052b8a6b36c3860f7673ee1e9731c1679 Mon Sep 17 00:00:00 2001 From: Stephen Boyd Date: Thu, 17 Dec 2009 16:05:29 -0800 Subject: [PATCH 02/19] technical-docs: document hash API Signed-off-by: Stephen Boyd Signed-off-by: Junio C Hamano --- Documentation/technical/api-hash.txt | 50 ++++++++++++++++++++++++++-- 1 file changed, 48 insertions(+), 2 deletions(-) diff --git a/Documentation/technical/api-hash.txt b/Documentation/technical/api-hash.txt index c784d3edcb..e5061e0677 100644 --- a/Documentation/technical/api-hash.txt +++ b/Documentation/technical/api-hash.txt @@ -1,6 +1,52 @@ hash API ======== -Talk about +The hash API is a collection of simple hash table functions. Users are expected +to implement their own hashing. -(Linus) +Data Structures +--------------- + +`struct hash_table`:: + + The hash table structure. The `array` member points to the hash table + entries. The `size` member counts the total number of valid and invalid + entries in the table. The `nr` member keeps track of the number of + valid entries. + +`struct hash_table_entry`:: + + An opaque structure representing an entry in the hash table. The `hash` + member is the entry's hash key and the `ptr` member is the entry's + value. + +Functions +--------- + +`init_hash`:: + + Initialize the hash table. + +`free_hash`:: + + Release memory associated with the hash table. + +`insert_hash`:: + + Insert a pointer into the hash table. If an entry with that hash + already exists, a pointer to the existing entry's value is returned. + Otherwise NULL is returned. This allows callers to implement + chaining, etc. + +`lookup_hash`:: + + Lookup an entry in the hash table. If an entry with that hash exists + the entry's value is returned. Otherwise NULL is returned. + +`for_each_hash`:: + + Call a function for each entry in the hash table. The function is + expected to take the entry's value as its only argument and return an + int. If the function returns a negative int the loop is aborted + immediately. Otherwise, the return value is accumulated and the sum + returned upon completion of the loop. From a5b80d92632a2d76325d4b6e6161022171a9fee4 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 19 Dec 2009 13:49:00 -0800 Subject: [PATCH 03/19] git svn: make empty directory creation gc-aware The "git svn gc" command creates and appends to unhandled.log.gz files which should be parsed before the uncompressed unhandled.log files. Reported-by: Robert Zeh Signed-off-by: Eric Wong --- git-svn.perl | 47 ++++++++++++++++++++++++++--------- t/t9146-git-svn-empty-dirs.sh | 24 ++++++++++++++++++ 2 files changed, 59 insertions(+), 12 deletions(-) diff --git a/git-svn.perl b/git-svn.perl index a4b052c71e..d362de7364 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -2740,21 +2740,44 @@ sub do_fetch { sub mkemptydirs { my ($self, $r) = @_; - my %empty_dirs = (); - open my $fh, '<', "$self->{dir}/unhandled.log" or return; - binmode $fh or croak "binmode: $!"; - while (<$fh>) { - if (defined $r && /^r(\d+)$/) { - last if $1 > $r; - } elsif (/^ \+empty_dir: (.+)$/) { - $empty_dirs{$1} = 1; - } elsif (/^ \-empty_dir: (.+)$/) { - my @d = grep {m[^\Q$1\E(/|$)]} (keys %empty_dirs); - delete @empty_dirs{@d}; + sub scan { + my ($r, $empty_dirs, $line) = @_; + if (defined $r && $line =~ /^r(\d+)$/) { + return 0 if $1 > $r; + } elsif ($line =~ /^ \+empty_dir: (.+)$/) { + $empty_dirs->{$1} = 1; + } elsif ($line =~ /^ \-empty_dir: (.+)$/) { + my @d = grep {m[^\Q$1\E(/|$)]} (keys %$empty_dirs); + delete @$empty_dirs{@d}; + } + 1; # continue + }; + + my %empty_dirs = (); + my $gz_file = "$self->{dir}/unhandled.log.gz"; + if (-f $gz_file) { + if (!$can_compress) { + warn "Compress::Zlib could not be found; ", + "empty directories in $gz_file will not be read\n"; + } else { + my $gz = Compress::Zlib::gzopen($gz_file, "rb") or + die "Unable to open $gz_file: $!\n"; + my $line; + while ($gz->gzreadline($line) > 0) { + scan($r, \%empty_dirs, $line) or last; + } + $gz->gzclose; } } - close $fh; + + if (open my $fh, '<', "$self->{dir}/unhandled.log") { + binmode $fh or croak "binmode: $!"; + while (<$fh>) { + scan($r, \%empty_dirs, $_) or last; + } + close $fh; + } my $strip = qr/\A\Q$self->{path}\E(?:\/|$)/; foreach my $d (sort keys %empty_dirs) { diff --git a/t/t9146-git-svn-empty-dirs.sh b/t/t9146-git-svn-empty-dirs.sh index 9b8d0463fa..3f2d719827 100755 --- a/t/t9146-git-svn-empty-dirs.sh +++ b/t/t9146-git-svn-empty-dirs.sh @@ -114,5 +114,29 @@ test_expect_success 'removed top-level directory does not exist' ' test ! -e removed/d ' +unhandled=.git/svn/refs/remotes/git-svn/unhandled.log +test_expect_success 'git svn gc-ed files work' ' + ( + cd removed && + git svn gc && + : Compress::Zlib may not be available && + if test -f "$unhandled".gz + then + svn mkdir -m gz "$svnrepo"/gz && + git reset --hard $(git rev-list HEAD | tail -1) && + git svn rebase && + test -f "$unhandled".gz && + test -f "$unhandled" && + for i in a b c "weird file name" gz "! !" + do + if ! test -d "$i" + then + echo >&2 "$i does not exist" + exit 1 + fi + done + fi + ) +' test_done From 8eca03c86134c3f73eb8f16899165a3bd2014376 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 19 Dec 2009 23:05:57 -0800 Subject: [PATCH 04/19] t9146: use 'svn_cmd' wrapper Using 'svn' directly may not work for all users. Signed-off-by: Eric Wong --- t/t9146-git-svn-empty-dirs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t9146-git-svn-empty-dirs.sh b/t/t9146-git-svn-empty-dirs.sh index 3f2d719827..565365cbd3 100755 --- a/t/t9146-git-svn-empty-dirs.sh +++ b/t/t9146-git-svn-empty-dirs.sh @@ -122,7 +122,7 @@ test_expect_success 'git svn gc-ed files work' ' : Compress::Zlib may not be available && if test -f "$unhandled".gz then - svn mkdir -m gz "$svnrepo"/gz && + svn_cmd mkdir -m gz "$svnrepo"/gz && git reset --hard $(git rev-list HEAD | tail -1) && git svn rebase && test -f "$unhandled".gz && From e49ca974d6ff2dda1ff4ee39e7cc33af33d1eb2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Sat, 19 Dec 2009 13:04:03 +0100 Subject: [PATCH 05/19] rebase -i: abort cleanly if the editor fails to launch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If the user's configured editor is emacsclient, the editor will fail to launch if emacs is not running and the git command that tried to lanuch the editor will abort. For most commands, all you have to do is to start emacs and repeat the command. The "git rebase -i" command, however, aborts without cleaning the "$GIT_DIR/rebase-merge" directory if it fails to launch the editor, so you'll need to do "git rebase --abort" before repeating the rebase command. Change "git rebase -i" to terminate using "die_abort" (instead of with "die") if the initial launch of the editor fails. Signed-off-by: Björn Gustavsson Signed-off-by: Junio C Hamano --- git-rebase--interactive.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index 3853b513b5..5014ae0579 100755 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@ -770,7 +770,7 @@ EOF cp "$TODO" "$TODO".backup git_editor "$TODO" || - die "Could not execute editor" + die_abort "Could not execute editor" has_action "$TODO" || die_abort "Nothing to do" From ab0964d951e4ea88f9ea2cbb88388c1bcd4ae911 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sun, 20 Dec 2009 12:15:02 -0800 Subject: [PATCH 06/19] Git 1.6.6-rc4 Hopefully the last rc before the final one. Signed-off-by: Junio C Hamano --- Documentation/RelNotes-1.6.6.txt | 15 ++++++++------- GIT-VERSION-GEN | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Documentation/RelNotes-1.6.6.txt b/Documentation/RelNotes-1.6.6.txt index b9e864238a..72df781e7d 100644 --- a/Documentation/RelNotes-1.6.6.txt +++ b/Documentation/RelNotes-1.6.6.txt @@ -22,10 +22,10 @@ These changes were discussed long time ago and existing behaviours have been identified as more problematic to the userbase than keeping them for the sake of backward compatibility. -When necessary, transition strategy for existing users has been designed +When necessary, a transition strategy for existing users has been designed not to force them running around setting configuration variables and updating their scripts in order to either keep the traditional behaviour -or adjust to the new behaviour on the day their sysadmin decides to install +or adjust to the new behaviour, on the day their sysadmin decides to install the new version of git. When we switched from "git-foo" to "git foo" in 1.6.0, even though the change had been advertised and the transition guide had been provided for a very long time, the users procrastinated @@ -34,11 +34,12 @@ their sysadmins updated their git installation. We are trying to avoid repeating that unpleasantness in the 1.7.0 release. For changes decided to be in 1.7.0, commands that will be affected -have been much louder to strongly discourage such procrastination. If -you have been using recent versions of git, you would have seen -warnings issued when you exercised features whose behaviour will -change, with a clear instruction on how to keep the existing behaviour -if you want to. You hopefully are already well prepared. +have been much louder to strongly discourage such procrastination, and +they continue to be in this release. If you have been using recent +versions of git, you would have seen warnings issued when you used +features whose behaviour will change, with a clear instruction on how +to keep the existing behaviour if you want to. You hopefully are +already well prepared. Of course, we have also been giving "this and that will change in 1.7.0; prepare yourselves" warnings in the release notes and diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index 039e8d427c..22f2461636 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -1,7 +1,7 @@ #!/bin/sh GVF=GIT-VERSION-FILE -DEF_VER=v1.6.6-rc3.GIT +DEF_VER=v1.6.6-rc4.GIT LF=' ' From 577e9fcad2c8968846b365226b89778050496a78 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 21 Dec 2009 02:06:04 -0800 Subject: [PATCH 07/19] git svn: fix --revision when fetching deleted paths When using the -r/--revision argument to fetch deleted history, calling SVN::Ra::get_log() from an SVN::Ra object initialized to track the deleted URL will fail. This regression was introduced in: commit 4aacaeb3dc82bb6479e70e120053dc27a399460e "fix shallow clone when upstream revision is too new" We now ignore errors from SVN::Ra::get_log() here because using --revision will always override the value of $head here if (and only if) we're tracking deleted directories. Signed-off-by: Eric Wong --- git-svn.perl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/git-svn.perl b/git-svn.perl index d362de7364..a6f5061c3c 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -1741,7 +1741,11 @@ sub fetch_all { my $ra = Git::SVN::Ra->new($url); my $uuid = $ra->get_uuid; my $head = $ra->get_latest_revnum; - $ra->get_log("", $head, 0, 1, 0, 1, sub { $head = $_[1] }); + + # ignore errors, $head revision may not even exist anymore + eval { $ra->get_log("", $head, 0, 1, 0, 1, sub { $head = $_[1] }) }; + warn "W: $@\n" if $@; + my $base = defined $fetch ? $head : 0; # read the max revs for wildcard expansion (branches/*, tags/*) From af57b41d41d4b1f85dceac57015539e3e0306859 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 21 Dec 2009 02:21:33 -0800 Subject: [PATCH 08/19] update release notes for git svn in 1.6.6 Signed-off-by: Eric Wong --- Documentation/RelNotes-1.6.6.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/RelNotes-1.6.6.txt b/Documentation/RelNotes-1.6.6.txt index 72df781e7d..75ef0b8b91 100644 --- a/Documentation/RelNotes-1.6.6.txt +++ b/Documentation/RelNotes-1.6.6.txt @@ -209,6 +209,8 @@ Updates since v1.6.5 * "git svn" learned to read SVN 1.5+ and SVK merge tickets. + * "git svn" learned to recreate empty directories tracked only by SVN. + * "gitweb" can optionally render its "blame" output incrementally (this requires JavaScript on the client side). From 1d144aa25edbb4dcda88abbaef8f336108b8d788 Mon Sep 17 00:00:00 2001 From: Sam Vilain Date: Sun, 20 Dec 2009 05:20:30 +1300 Subject: [PATCH 09/19] git-svn: expand the svn mergeinfo test suite, highlighting some failures As shown, git-svn has some problems; not all svn merges are correctly detected, and cherry picks may incorrectly be detected as real merges. These test cases will be marked as _success once the relevant fixes are in. Signed-off-by: Sam Vilain Acked-by: Eric Wong --- t/t9151-svn-mergeinfo.sh | 27 +- t/t9151/make-svnmerge-dump | 170 ++++-- t/t9151/svn-mergeinfo.dump | 1017 +++++++++++++++++++++++++++++------- 3 files changed, 951 insertions(+), 263 deletions(-) diff --git a/t/t9151-svn-mergeinfo.sh b/t/t9151-svn-mergeinfo.sh index f57daf401a..dc3478fbbc 100755 --- a/t/t9151-svn-mergeinfo.sh +++ b/t/t9151-svn-mergeinfo.sh @@ -15,12 +15,27 @@ test_expect_success 'load svn dump' " git svn fetch --all " -test_expect_success 'represent svn merges without intervening commits' " - [ `git cat-file commit HEAD^1 | grep parent | wc -l` -eq 2 ] - " +test_expect_failure 'all svn merges became git merge commits' ' + unmarked=$(git rev-list --parents --all --grep=Merge | + grep -v " .* " | cut -f1 -d" ") + [ -z "$unmarked" ] + ' -test_expect_success 'represent svn merges with intervening commits' " - [ `git cat-file commit HEAD | grep parent | wc -l` -eq 2 ] - " +test_expect_failure 'cherry picks did not become git merge commits' ' + bad_cherries=$(git rev-list --parents --all --grep=Cherry | + grep " .* " | cut -f1 -d" ") + [ -z "$bad_cherries" ] + ' + +test_expect_success 'svn non-merge merge commits did not become git merge commits' ' + bad_non_merges=$(git rev-list --parents --all --grep=non-merge | + grep " .* " | cut -f1 -d" ") + [ -z "$bad_non_merges" ] + ' + +test_expect_failure 'everything got merged in the end' ' + unmerged=$(git rev-list --all --not master) + [ -z "$unmerged" ] + ' test_done diff --git a/t/t9151/make-svnmerge-dump b/t/t9151/make-svnmerge-dump index 7e3da75f86..d917717cf3 100644 --- a/t/t9151/make-svnmerge-dump +++ b/t/t9151/make-svnmerge-dump @@ -11,93 +11,151 @@ mkdir foo.svn svnadmin create foo.svn svn co file://`pwd`/foo.svn foo +commit() { + i=$(( $1 + 1 )) + shift; + svn commit -m "(r$i) $*" >/dev/null || exit 1 + echo $i +} + +say() { + echo " * $*" +} + +i=0 cd foo mkdir trunk mkdir branches svn add trunk branches -svn commit -m "Setup trunk and branches" -cd trunk +i=$(commit $i "Setup trunk and branches") -git cat-file blob 6683463e:Makefile > Makefile -svn add Makefile +git cat-file blob 6683463e:Makefile > trunk/Makefile +svn add trunk/Makefile -echo "Committing ANCESTOR" -svn commit -m "ancestor" -cd .. +say "Committing ANCESTOR" +i=$(commit $i "ancestor") svn cp trunk branches/left -echo "Committing BRANCH POINT" -svn commit -m "make left branch" +say "Committing BRANCH POINT" +i=$(commit $i "make left branch") svn cp trunk branches/right -echo "Committing other BRANCH POINT" -svn commit -m "make right branch" -cd branches/left/ +say "Committing other BRANCH POINT" +i=$(commit $i "make right branch") -#$sm init -#svn commit -m "init svnmerge" +say "Committing LEFT UPDATE" +git cat-file blob 5873b67e:Makefile > branches/left/Makefile +i=$(commit $i "left update 1") -git cat-file blob 5873b67e:Makefile > Makefile -echo "Committing BRANCH UPDATE 1" -svn commit -m "left update 1" -cd ../.. +git cat-file blob 75118b13:Makefile > branches/right/Makefile +say "Committing RIGHT UPDATE" +pre_right_update_1=$i +i=$(commit $i "right update 1") -cd trunk -git cat-file blob 75118b13:Makefile > Makefile -echo "Committing TRUNK UPDATE" -svn commit -m "trunk update" +say "Making more commits on LEFT" +git cat-file blob ff5ebe39:Makefile > branches/left/Makefile +i=$(commit $i "left update 2") +git cat-file blob b5039db6:Makefile > branches/left/Makefile +i=$(commit $i "left update 3") -cd ../branches/left -git cat-file blob ff5ebe39:Makefile > Makefile -echo "Committing BRANCH UPDATE 2" -svn commit -m "left update 2" +say "Making a LEFT SUB-BRANCH" +svn cp branches/left branches/left-sub +sub_left_make=$i +i=$(commit $i "make left sub-branch") -git cat-file blob b5039db6:Makefile > Makefile -echo "Committing BRANCH UPDATE 3" -svn commit -m "left update 3" +say "Making a commit on LEFT SUB-BRANCH" +echo "crunch" > branches/left-sub/README +svn add branches/left-sub/README +i=$(commit $i "left sub-branch update 1") -# merge to trunk - -cd ../.. +say "Merging LEFT to TRUNK" svn update cd trunk - svn merge ../branches/left --accept postpone - -git cat-file blob b51ad431:Makefile > Makefile - -svn resolved Makefile - -svn commit -m "Merge trunk 1" - -# create commits on both branches - -cd ../branches/left -git cat-file blob ff5ebe39:Makefile > Makefile -echo "Committing BRANCH UPDATE 4" -svn commit -m "left update 4" - -cd ../right git cat-file blob b5039db6:Makefile > Makefile -echo "Committing other BRANCH UPDATE 1" -svn commit -m "right update 1" +svn resolved Makefile +i=$(commit $i "Merge left to trunk 1") +cd .. -# merge to trun again +say "Making more commits on LEFT and RIGHT" +echo "touche" > branches/left/zlonk +svn add branches/left/zlonk +i=$(commit $i "left update 4") +echo "thwacke" > branches/right/bang +svn add branches/right/bang +i=$(commit $i "right update 2") -cd ../.. +say "Squash merge of RIGHT tip 2 commits onto TRUNK" svn update cd trunk +svn merge -r$pre_right_update_1:$i ../branches/right +i=$(commit $i "Cherry-pick right 2 commits to trunk") +cd .. -svn merge ../branches/left --accept postpone - +say "Merging RIGHT to TRUNK" +svn update +cd trunk +svn merge ../branches/right --accept postpone git cat-file blob b51ad431:Makefile > Makefile - svn resolved Makefile +i=$(commit $i "Merge right to trunk 1") +cd .. -svn commit -m "Merge trunk 2" +say "Making more commits on RIGHT and TRUNK" +echo "whamm" > branches/right/urkkk +svn add branches/right/urkkk +i=$(commit $i "right update 3") +echo "pow" > trunk/vronk +svn add trunk/vronk +i=$(commit $i "trunk update 1") +say "Merging RIGHT to LEFT SUB-BRANCH" +svn update +cd branches/left-sub +svn merge ../right --accept postpone +git cat-file blob b51ad431:Makefile > Makefile +svn resolved Makefile +i=$(commit $i "Merge right to left sub-branch") cd ../.. +say "Making more commits on LEFT SUB-BRANCH and LEFT" +echo "zowie" > branches/left-sub/wham_eth +svn add branches/left-sub/wham_eth +pre_sub_left_update_2=$i +i=$(commit $i "left sub-branch update 2") +sub_left_update_2=$i +echo "eee_yow" > branches/left/glurpp +svn add branches/left/glurpp +i=$(commit $i "left update 5") + +say "Cherry pick LEFT SUB-BRANCH commit to LEFT" +svn update +cd branches/left +svn merge -r$pre_sub_left_update_2:$sub_left_update_2 ../left-sub +i=$(commit $i "Cherry-pick left sub-branch commit to left") +cd ../.. + +say "Merging LEFT SUB-BRANCH back to LEFT" +svn update +cd branches/left +# it's only a merge because the previous merge cherry-picked the top commit +svn merge -r$sub_left_make:$sub_left_update_2 ../left-sub --accept postpone +i=$(commit $i "Merge left sub-branch to left") +cd ../.. + +say "Merging EVERYTHING to TRUNK" +svn update +cd trunk +svn merge ../branches/left --accept postpone +svn resolved bang +i=$(commit $i "Merge left to trunk 2") +# this merge, svn happily updates the mergeinfo, but there is actually +# nothing to merge. git-svn will not make a meaningless merge commit. +svn merge ../branches/right --accept postpone +i=$(commit $i "non-merge right to trunk 2") +cd .. + +cd .. svnadmin dump foo.svn > svn-mergeinfo.dump rm -rf foo foo.svn diff --git a/t/t9151/svn-mergeinfo.dump b/t/t9151/svn-mergeinfo.dump index 11a883fda9..9543e31c96 100644 --- a/t/t9151/svn-mergeinfo.dump +++ b/t/t9151/svn-mergeinfo.dump @@ -1,6 +1,6 @@ SVN-fs-dump-format-version: 2 -UUID: 1530d5a2-a1dc-4438-8ad5-d95e96db8945 +UUID: 64142547-0943-4db2-836a-d1e1eb2f9924 Revision-number: 0 Prop-content-length: 56 @@ -9,25 +9,25 @@ Content-length: 56 K 8 svn:date V 27 -2009-11-12T20:29:38.812226Z +2009-12-19T16:17:51.232640Z PROPS-END Revision-number: 1 -Prop-content-length: 127 -Content-length: 127 +Prop-content-length: 128 +Content-length: 128 K 7 svn:log -V 24 -Setup trunk and branches +V 29 +(r1) Setup trunk and branches K 10 svn:author -V 8 -tallsopp +V 4 +samv K 8 svn:date V 27 -2009-11-12T20:29:39.045856Z +2009-12-19T16:17:51.831965Z PROPS-END Node-path: branches @@ -49,21 +49,21 @@ PROPS-END Revision-number: 2 -Prop-content-length: 110 -Content-length: 110 +Prop-content-length: 112 +Content-length: 112 K 7 svn:log -V 8 -ancestor +V 13 +(r2) ancestor K 10 svn:author -V 8 -tallsopp +V 4 +samv K 8 svn:date V 27 -2009-11-12T20:29:40.079587Z +2009-12-19T16:17:52.300075Z PROPS-END Node-path: trunk/Makefile @@ -156,21 +156,21 @@ backup: clean Revision-number: 3 -Prop-content-length: 119 -Content-length: 119 +Prop-content-length: 120 +Content-length: 120 K 7 svn:log -V 16 -make left branch +V 21 +(r3) make left branch K 10 svn:author -V 8 -tallsopp +V 4 +samv K 8 svn:date V 27 -2009-11-12T20:29:42.084439Z +2009-12-19T16:17:52.768800Z PROPS-END Node-path: branches/left @@ -190,21 +190,21 @@ Text-copy-source-sha1: 103205ce331f7d64086dba497574734f78439590 Revision-number: 4 -Prop-content-length: 120 -Content-length: 120 +Prop-content-length: 121 +Content-length: 121 K 7 svn:log -V 17 -make right branch +V 22 +(r4) make right branch K 10 svn:author -V 8 -tallsopp +V 4 +samv K 8 svn:date V 27 -2009-11-12T20:29:44.065452Z +2009-12-19T16:17:53.177879Z PROPS-END Node-path: branches/right @@ -224,21 +224,21 @@ Text-copy-source-sha1: 103205ce331f7d64086dba497574734f78439590 Revision-number: 5 -Prop-content-length: 116 -Content-length: 116 +Prop-content-length: 117 +Content-length: 117 K 7 svn:log -V 13 -left update 1 +V 18 +(r5) left update 1 K 10 svn:author -V 8 -tallsopp +V 4 +samv K 8 svn:date V 27 -2009-11-12T20:29:45.066262Z +2009-12-19T16:17:53.604691Z PROPS-END Node-path: branches/left/Makefile @@ -329,24 +329,24 @@ backup: clean Revision-number: 6 -Prop-content-length: 115 -Content-length: 115 +Prop-content-length: 118 +Content-length: 118 K 7 svn:log -V 12 -trunk update +V 19 +(r6) right update 1 K 10 svn:author -V 8 -tallsopp +V 4 +samv K 8 svn:date V 27 -2009-11-12T20:29:46.278498Z +2009-12-19T16:17:54.063555Z PROPS-END -Node-path: trunk/Makefile +Node-path: branches/right/Makefile Node-kind: file Node-action: change Text-content-length: 2521 @@ -437,21 +437,21 @@ backup: clean Revision-number: 7 -Prop-content-length: 116 -Content-length: 116 +Prop-content-length: 117 +Content-length: 117 K 7 svn:log -V 13 -left update 2 +V 18 +(r7) left update 2 K 10 svn:author -V 8 -tallsopp +V 4 +samv K 8 svn:date V 27 -2009-11-12T20:29:47.069090Z +2009-12-19T16:17:54.523904Z PROPS-END Node-path: branches/left/Makefile @@ -542,21 +542,21 @@ backup: clean Revision-number: 8 -Prop-content-length: 116 -Content-length: 116 +Prop-content-length: 117 +Content-length: 117 K 7 svn:log -V 13 -left update 3 +V 18 +(r8) left update 3 K 10 svn:author -V 8 -tallsopp +V 4 +samv K 8 svn:date V 27 -2009-11-12T20:29:48.053835Z +2009-12-19T16:17:54.975970Z PROPS-END Node-path: branches/left/Makefile @@ -647,33 +647,285 @@ backup: clean Revision-number: 9 -Prop-content-length: 116 -Content-length: 116 +Prop-content-length: 124 +Content-length: 124 K 7 svn:log -V 13 -Merge trunk 1 +V 25 +(r9) make left sub-branch K 10 svn:author -V 8 -tallsopp +V 4 +samv K 8 svn:date V 27 -2009-11-12T20:29:51.098306Z +2009-12-19T16:17:55.459904Z +PROPS-END + +Node-path: branches/left-sub +Node-kind: dir +Node-action: add +Node-copyfrom-rev: 3 +Node-copyfrom-path: branches/left + + +Node-path: branches/left-sub/Makefile +Node-kind: file +Node-action: delete + +Node-path: branches/left-sub/Makefile +Node-kind: file +Node-action: add +Node-copyfrom-rev: 8 +Node-copyfrom-path: branches/left/Makefile +Text-copy-source-md5: 5ccff689fb290e00b85fe18ee50c54ba +Text-copy-source-sha1: a13de8e23f1483efca3e57b2b64b0ae6f740ce10 + + + + +Revision-number: 10 +Prop-content-length: 129 +Content-length: 129 + +K 7 +svn:log +V 30 +(r10) left sub-branch update 1 +K 10 +svn:author +V 4 +samv +K 8 +svn:date +V 27 +2009-12-19T16:17:55.862113Z +PROPS-END + +Node-path: branches/left-sub/README +Node-kind: file +Node-action: add +Prop-content-length: 10 +Text-content-length: 7 +Text-content-md5: fdbcfb6be9afe1121862143f226b51cf +Text-content-sha1: 1d1f5ea4ceb584337ffe59b8980d92e3b78dfef4 +Content-length: 17 + +PROPS-END +crunch + + +Revision-number: 11 +Prop-content-length: 126 +Content-length: 126 + +K 7 +svn:log +V 27 +(r11) Merge left to trunk 1 +K 10 +svn:author +V 4 +samv +K 8 +svn:date +V 27 +2009-12-19T16:17:56.413416Z PROPS-END Node-path: trunk Node-kind: dir Node-action: change -Prop-content-length: 53 -Content-length: 53 +Prop-content-length: 54 +Content-length: 54 K 13 svn:mergeinfo -V 18 -/branches/left:2-8 +V 19 +/branches/left:2-10 +PROPS-END + + +Node-path: trunk/Makefile +Node-kind: file +Node-action: change +Text-content-length: 2593 +Text-content-md5: 5ccff689fb290e00b85fe18ee50c54ba +Text-content-sha1: a13de8e23f1483efca3e57b2b64b0ae6f740ce10 +Content-length: 2593 + +# -DCOLLISION_CHECK if you believe that SHA1's +# 1461501637330902918203684832716283019655932542976 hashes do not give you +# enough guarantees about no collisions between objects ever hapenning. +# +# -DNSEC if you want git to care about sub-second file mtimes and ctimes. +# Note that you need some new glibc (at least >2.2.4) for this, and it will +# BREAK YOUR LOCAL DIFFS! show-diff and anything using it will likely randomly +# break unless your underlying filesystem supports those sub-second times +# (my ext3 doesn't). +CFLAGS=-g -O3 -Wall + +CC=gcc + + +PROG= update-cache show-diff init-db write-tree read-tree commit-tree \ + cat-file fsck-cache checkout-cache diff-tree rev-tree show-files \ + check-files ls-tree merge-base + +all: $(PROG) + +install: $(PROG) + install $(PROG) $(HOME)/bin/ + +LIBS= -lssl -lz + +init-db: init-db.o + +update-cache: update-cache.o read-cache.o + $(CC) $(CFLAGS) -o update-cache update-cache.o read-cache.o $(LIBS) + +show-diff: show-diff.o read-cache.o + $(CC) $(CFLAGS) -o show-diff show-diff.o read-cache.o $(LIBS) + +write-tree: write-tree.o read-cache.o + $(CC) $(CFLAGS) -o write-tree write-tree.o read-cache.o $(LIBS) + +read-tree: read-tree.o read-cache.o + $(CC) $(CFLAGS) -o read-tree read-tree.o read-cache.o $(LIBS) + +commit-tree: commit-tree.o read-cache.o + $(CC) $(CFLAGS) -o commit-tree commit-tree.o read-cache.o $(LIBS) + +cat-file: cat-file.o read-cache.o + $(CC) $(CFLAGS) -o cat-file cat-file.o read-cache.o $(LIBS) + +fsck-cache: fsck-cache.o read-cache.o object.o commit.o tree.o blob.o + $(CC) $(CFLAGS) -o fsck-cache fsck-cache.o read-cache.o object.o commit.o tree.o blob.o $(LIBS) + +checkout-cache: checkout-cache.o read-cache.o + $(CC) $(CFLAGS) -o checkout-cache checkout-cache.o read-cache.o $(LIBS) + +diff-tree: diff-tree.o read-cache.o + $(CC) $(CFLAGS) -o diff-tree diff-tree.o read-cache.o $(LIBS) + +rev-tree: rev-tree.o read-cache.o object.o commit.o tree.o blob.o + $(CC) $(CFLAGS) -o rev-tree rev-tree.o read-cache.o object.o commit.o tree.o blob.o $(LIBS) + +show-files: show-files.o read-cache.o + $(CC) $(CFLAGS) -o show-files show-files.o read-cache.o $(LIBS) + +check-files: check-files.o read-cache.o + $(CC) $(CFLAGS) -o check-files check-files.o read-cache.o $(LIBS) + +ls-tree: ls-tree.o read-cache.o + $(CC) $(CFLAGS) -o ls-tree ls-tree.o read-cache.o $(LIBS) + +merge-base: merge-base.o read-cache.o object.o commit.o tree.o blob.o + $(CC) $(CFLAGS) -o merge-base merge-base.o read-cache.o object.o commit.o tree.o blob.o $(LIBS) + +read-cache.o: cache.h +show-diff.o: cache.h + +clean: + rm -f *.o $(PROG) + +backup: clean + cd .. ; tar czvf dircache.tar.gz dir-cache + + +Revision-number: 12 +Prop-content-length: 118 +Content-length: 118 + +K 7 +svn:log +V 19 +(r12) left update 4 +K 10 +svn:author +V 4 +samv +K 8 +svn:date +V 27 +2009-12-19T16:17:56.831014Z +PROPS-END + +Node-path: branches/left/zlonk +Node-kind: file +Node-action: add +Prop-content-length: 10 +Text-content-length: 7 +Text-content-md5: 8b9d8c7c2aaa6167e7d3407a773bbbba +Text-content-sha1: 9716527ebd70a75c27625cacbeb2d897c6e86178 +Content-length: 17 + +PROPS-END +touche + + +Revision-number: 13 +Prop-content-length: 119 +Content-length: 119 + +K 7 +svn:log +V 20 +(r13) right update 2 +K 10 +svn:author +V 4 +samv +K 8 +svn:date +V 27 +2009-12-19T16:17:57.341143Z +PROPS-END + +Node-path: branches/right/bang +Node-kind: file +Node-action: add +Prop-content-length: 10 +Text-content-length: 8 +Text-content-md5: 34c28f1d2dc6a9adeccc4265bf7516cb +Text-content-sha1: 0bc5bb345c0e71d28f784f12e0bd2d384c283062 +Content-length: 18 + +PROPS-END +thwacke + + +Revision-number: 14 +Prop-content-length: 141 +Content-length: 141 + +K 7 +svn:log +V 42 +(r14) Cherry-pick right 2 commits to trunk +K 10 +svn:author +V 4 +samv +K 8 +svn:date +V 27 +2009-12-19T16:17:57.841851Z +PROPS-END + +Node-path: trunk +Node-kind: dir +Node-action: change +Prop-content-length: 75 +Content-length: 75 + +K 13 +svn:mergeinfo +V 40 +/branches/left:2-10 +/branches/right:6-13 PROPS-END @@ -767,31 +1019,147 @@ backup: clean cd .. ; tar czvf dircache.tar.gz dir-cache -Revision-number: 10 -Prop-content-length: 116 -Content-length: 116 +Node-path: trunk/bang +Node-kind: file +Node-action: add +Node-copyfrom-rev: 13 +Node-copyfrom-path: branches/right/bang +Text-copy-source-md5: 34c28f1d2dc6a9adeccc4265bf7516cb +Text-copy-source-sha1: 0bc5bb345c0e71d28f784f12e0bd2d384c283062 + + +Revision-number: 15 +Prop-content-length: 127 +Content-length: 127 K 7 svn:log -V 13 -left update 4 +V 28 +(r15) Merge right to trunk 1 K 10 svn:author -V 8 -tallsopp +V 4 +samv K 8 svn:date V 27 -2009-11-12T20:29:52.081644Z +2009-12-19T16:17:58.368520Z PROPS-END -Node-path: branches/left/Makefile +Node-path: trunk +Node-kind: dir +Node-action: change +Prop-content-length: 75 +Content-length: 75 + +K 13 +svn:mergeinfo +V 40 +/branches/left:2-10 +/branches/right:2-14 +PROPS-END + + +Revision-number: 16 +Prop-content-length: 119 +Content-length: 119 + +K 7 +svn:log +V 20 +(r16) right update 3 +K 10 +svn:author +V 4 +samv +K 8 +svn:date +V 27 +2009-12-19T16:17:58.779056Z +PROPS-END + +Node-path: branches/right/urkkk +Node-kind: file +Node-action: add +Prop-content-length: 10 +Text-content-length: 6 +Text-content-md5: 5889c8392e16251b0c80927607a03036 +Text-content-sha1: 3934264d277a0cf886b6b1c7f2b9e56da2525302 +Content-length: 16 + +PROPS-END +whamm + + +Revision-number: 17 +Prop-content-length: 119 +Content-length: 119 + +K 7 +svn:log +V 20 +(r17) trunk update 1 +K 10 +svn:author +V 4 +samv +K 8 +svn:date +V 27 +2009-12-19T16:17:59.221851Z +PROPS-END + +Node-path: trunk/vronk +Node-kind: file +Node-action: add +Prop-content-length: 10 +Text-content-length: 4 +Text-content-md5: b2f80fa02a7f1364b9c29d3da44bf9f9 +Text-content-sha1: e994d980c0f2d7a3f76138bf96d57f36f9633828 +Content-length: 14 + +PROPS-END +pow + + +Revision-number: 18 +Prop-content-length: 135 +Content-length: 135 + +K 7 +svn:log +V 36 +(r18) Merge right to left sub-branch +K 10 +svn:author +V 4 +samv +K 8 +svn:date +V 27 +2009-12-19T16:17:59.781666Z +PROPS-END + +Node-path: branches/left-sub +Node-kind: dir +Node-action: change +Prop-content-length: 55 +Content-length: 55 + +K 13 +svn:mergeinfo +V 20 +/branches/right:2-17 +PROPS-END + + +Node-path: branches/left-sub/Makefile Node-kind: file Node-action: change -Text-content-length: 2529 -Text-content-md5: f6b197cc3f2e89a83e545d4bb003de73 -Text-content-sha1: 2f656677cfec0bceec85e53036ffb63e25126f8e -Content-length: 2529 +Text-content-length: 2713 +Text-content-md5: 0afbe34f244cd662b1f97d708c687f90 +Text-content-sha1: 46d9377d783e67a9b581da110352e799517c8a14 +Content-length: 2713 # -DCOLLISION_CHECK if you believe that SHA1's # 1461501637330902918203684832716283019655932542976 hashes do not give you @@ -809,112 +1177,7 @@ CC=gcc PROG= update-cache show-diff init-db write-tree read-tree commit-tree \ cat-file fsck-cache checkout-cache diff-tree rev-tree show-files \ - check-files ls-tree merge-base - -all: $(PROG) - -install: $(PROG) - install $(PROG) $(HOME)/bin/ - -LIBS= -lssl -lz - -init-db: init-db.o - -update-cache: update-cache.o read-cache.o - $(CC) $(CFLAGS) -o update-cache update-cache.o read-cache.o $(LIBS) - -show-diff: show-diff.o read-cache.o - $(CC) $(CFLAGS) -o show-diff show-diff.o read-cache.o $(LIBS) - -write-tree: write-tree.o read-cache.o - $(CC) $(CFLAGS) -o write-tree write-tree.o read-cache.o $(LIBS) - -read-tree: read-tree.o read-cache.o - $(CC) $(CFLAGS) -o read-tree read-tree.o read-cache.o $(LIBS) - -commit-tree: commit-tree.o read-cache.o - $(CC) $(CFLAGS) -o commit-tree commit-tree.o read-cache.o $(LIBS) - -cat-file: cat-file.o read-cache.o - $(CC) $(CFLAGS) -o cat-file cat-file.o read-cache.o $(LIBS) - -fsck-cache: fsck-cache.o read-cache.o object.o commit.o tree.o blob.o - $(CC) $(CFLAGS) -o fsck-cache fsck-cache.o read-cache.o object.o commit.o tree.o blob.o $(LIBS) - -checkout-cache: checkout-cache.o read-cache.o - $(CC) $(CFLAGS) -o checkout-cache checkout-cache.o read-cache.o $(LIBS) - -diff-tree: diff-tree.o read-cache.o - $(CC) $(CFLAGS) -o diff-tree diff-tree.o read-cache.o $(LIBS) - -rev-tree: rev-tree.o read-cache.o object.o commit.o tree.o blob.o - $(CC) $(CFLAGS) -o rev-tree rev-tree.o read-cache.o object.o commit.o tree.o blob.o $(LIBS) - -show-files: show-files.o read-cache.o - $(CC) $(CFLAGS) -o show-files show-files.o read-cache.o $(LIBS) - -check-files: check-files.o read-cache.o - $(CC) $(CFLAGS) -o check-files check-files.o read-cache.o $(LIBS) - -ls-tree: ls-tree.o read-cache.o - $(CC) $(CFLAGS) -o ls-tree ls-tree.o read-cache.o $(LIBS) - -merge-base: merge-base.o read-cache.o - $(CC) $(CFLAGS) -o merge-base merge-base.o read-cache.o $(LIBS) - -read-cache.o: cache.h -show-diff.o: cache.h - -clean: - rm -f *.o $(PROG) - -backup: clean - cd .. ; tar czvf dircache.tar.gz dir-cache - - -Revision-number: 11 -Prop-content-length: 117 -Content-length: 117 - -K 7 -svn:log -V 14 -right update 1 -K 10 -svn:author -V 8 -tallsopp -K 8 -svn:date -V 27 -2009-11-12T20:29:53.059636Z -PROPS-END - -Node-path: branches/right/Makefile -Node-kind: file -Node-action: change -Text-content-length: 2593 -Text-content-md5: 5ccff689fb290e00b85fe18ee50c54ba -Text-content-sha1: a13de8e23f1483efca3e57b2b64b0ae6f740ce10 -Content-length: 2593 - -# -DCOLLISION_CHECK if you believe that SHA1's -# 1461501637330902918203684832716283019655932542976 hashes do not give you -# enough guarantees about no collisions between objects ever hapenning. -# -# -DNSEC if you want git to care about sub-second file mtimes and ctimes. -# Note that you need some new glibc (at least >2.2.4) for this, and it will -# BREAK YOUR LOCAL DIFFS! show-diff and anything using it will likely randomly -# break unless your underlying filesystem supports those sub-second times -# (my ext3 doesn't). -CFLAGS=-g -O3 -Wall - -CC=gcc - - -PROG= update-cache show-diff init-db write-tree read-tree commit-tree \ - cat-file fsck-cache checkout-cache diff-tree rev-tree show-files \ - check-files ls-tree merge-base + check-files ls-tree merge-base merge-cache all: $(PROG) @@ -967,6 +1230,9 @@ ls-tree: ls-tree.o read-cache.o merge-base: merge-base.o read-cache.o object.o commit.o tree.o blob.o $(CC) $(CFLAGS) -o merge-base merge-base.o read-cache.o object.o commit.o tree.o blob.o $(LIBS) +merge-cache: merge-cache.o read-cache.o + $(CC) $(CFLAGS) -o merge-cache merge-cache.o read-cache.o $(LIBS) + read-cache.o: cache.h show-diff.o: cache.h @@ -977,34 +1243,383 @@ backup: clean cd .. ; tar czvf dircache.tar.gz dir-cache -Revision-number: 12 -Prop-content-length: 116 -Content-length: 116 +Node-path: branches/left-sub/bang +Node-kind: file +Node-action: add +Node-copyfrom-rev: 17 +Node-copyfrom-path: branches/right/bang +Text-copy-source-md5: 34c28f1d2dc6a9adeccc4265bf7516cb +Text-copy-source-sha1: 0bc5bb345c0e71d28f784f12e0bd2d384c283062 + + +Node-path: branches/left-sub/urkkk +Node-kind: file +Node-action: add +Node-copyfrom-rev: 17 +Node-copyfrom-path: branches/right/urkkk +Text-copy-source-md5: 5889c8392e16251b0c80927607a03036 +Text-copy-source-sha1: 3934264d277a0cf886b6b1c7f2b9e56da2525302 + + +Revision-number: 19 +Prop-content-length: 129 +Content-length: 129 K 7 svn:log -V 13 -Merge trunk 2 +V 30 +(r19) left sub-branch update 2 K 10 svn:author -V 8 -tallsopp +V 4 +samv K 8 svn:date V 27 -2009-11-12T20:29:56.083003Z +2009-12-19T16:18:00.200531Z +PROPS-END + +Node-path: branches/left-sub/wham_eth +Node-kind: file +Node-action: add +Prop-content-length: 10 +Text-content-length: 6 +Text-content-md5: 757bcd5818572ef3f9580052617c1c8b +Text-content-sha1: b165019b005c199237ba822c4404e771e93b654a +Content-length: 16 + +PROPS-END +zowie + + +Revision-number: 20 +Prop-content-length: 118 +Content-length: 118 + +K 7 +svn:log +V 19 +(r20) left update 5 +K 10 +svn:author +V 4 +samv +K 8 +svn:date +V 27 +2009-12-19T16:18:00.659636Z +PROPS-END + +Node-path: branches/left/glurpp +Node-kind: file +Node-action: add +Prop-content-length: 10 +Text-content-length: 8 +Text-content-md5: 14a169f628e0bb59df9c2160649d0a30 +Text-content-sha1: ef7d929e52177767ecfcd28941f6b7f04b4131e3 +Content-length: 18 + +PROPS-END +eee_yow + + +Revision-number: 21 +Prop-content-length: 147 +Content-length: 147 + +K 7 +svn:log +V 48 +(r21) Cherry-pick left sub-branch commit to left +K 10 +svn:author +V 4 +samv +K 8 +svn:date +V 27 +2009-12-19T16:18:01.194402Z +PROPS-END + +Node-path: branches/left +Node-kind: dir +Node-action: change +Prop-content-length: 56 +Content-length: 56 + +K 13 +svn:mergeinfo +V 21 +/branches/left-sub:19 +PROPS-END + + +Node-path: branches/left/wham_eth +Node-kind: file +Node-action: add +Node-copyfrom-rev: 19 +Node-copyfrom-path: branches/left-sub/wham_eth +Text-copy-source-md5: 757bcd5818572ef3f9580052617c1c8b +Text-copy-source-sha1: b165019b005c199237ba822c4404e771e93b654a + + +Revision-number: 22 +Prop-content-length: 134 +Content-length: 134 + +K 7 +svn:log +V 35 +(r22) Merge left sub-branch to left +K 10 +svn:author +V 4 +samv +K 8 +svn:date +V 27 +2009-12-19T16:18:01.679218Z +PROPS-END + +Node-path: branches/left +Node-kind: dir +Node-action: change +Prop-content-length: 79 +Content-length: 79 + +K 13 +svn:mergeinfo +V 44 +/branches/left-sub:4-19 +/branches/right:2-17 +PROPS-END + + +Node-path: branches/left/Makefile +Node-kind: file +Node-action: change +Text-content-length: 2713 +Text-content-md5: 0afbe34f244cd662b1f97d708c687f90 +Text-content-sha1: 46d9377d783e67a9b581da110352e799517c8a14 +Content-length: 2713 + +# -DCOLLISION_CHECK if you believe that SHA1's +# 1461501637330902918203684832716283019655932542976 hashes do not give you +# enough guarantees about no collisions between objects ever hapenning. +# +# -DNSEC if you want git to care about sub-second file mtimes and ctimes. +# Note that you need some new glibc (at least >2.2.4) for this, and it will +# BREAK YOUR LOCAL DIFFS! show-diff and anything using it will likely randomly +# break unless your underlying filesystem supports those sub-second times +# (my ext3 doesn't). +CFLAGS=-g -O3 -Wall + +CC=gcc + + +PROG= update-cache show-diff init-db write-tree read-tree commit-tree \ + cat-file fsck-cache checkout-cache diff-tree rev-tree show-files \ + check-files ls-tree merge-base merge-cache + +all: $(PROG) + +install: $(PROG) + install $(PROG) $(HOME)/bin/ + +LIBS= -lssl -lz + +init-db: init-db.o + +update-cache: update-cache.o read-cache.o + $(CC) $(CFLAGS) -o update-cache update-cache.o read-cache.o $(LIBS) + +show-diff: show-diff.o read-cache.o + $(CC) $(CFLAGS) -o show-diff show-diff.o read-cache.o $(LIBS) + +write-tree: write-tree.o read-cache.o + $(CC) $(CFLAGS) -o write-tree write-tree.o read-cache.o $(LIBS) + +read-tree: read-tree.o read-cache.o + $(CC) $(CFLAGS) -o read-tree read-tree.o read-cache.o $(LIBS) + +commit-tree: commit-tree.o read-cache.o + $(CC) $(CFLAGS) -o commit-tree commit-tree.o read-cache.o $(LIBS) + +cat-file: cat-file.o read-cache.o + $(CC) $(CFLAGS) -o cat-file cat-file.o read-cache.o $(LIBS) + +fsck-cache: fsck-cache.o read-cache.o object.o commit.o tree.o blob.o + $(CC) $(CFLAGS) -o fsck-cache fsck-cache.o read-cache.o object.o commit.o tree.o blob.o $(LIBS) + +checkout-cache: checkout-cache.o read-cache.o + $(CC) $(CFLAGS) -o checkout-cache checkout-cache.o read-cache.o $(LIBS) + +diff-tree: diff-tree.o read-cache.o + $(CC) $(CFLAGS) -o diff-tree diff-tree.o read-cache.o $(LIBS) + +rev-tree: rev-tree.o read-cache.o object.o commit.o tree.o blob.o + $(CC) $(CFLAGS) -o rev-tree rev-tree.o read-cache.o object.o commit.o tree.o blob.o $(LIBS) + +show-files: show-files.o read-cache.o + $(CC) $(CFLAGS) -o show-files show-files.o read-cache.o $(LIBS) + +check-files: check-files.o read-cache.o + $(CC) $(CFLAGS) -o check-files check-files.o read-cache.o $(LIBS) + +ls-tree: ls-tree.o read-cache.o + $(CC) $(CFLAGS) -o ls-tree ls-tree.o read-cache.o $(LIBS) + +merge-base: merge-base.o read-cache.o object.o commit.o tree.o blob.o + $(CC) $(CFLAGS) -o merge-base merge-base.o read-cache.o object.o commit.o tree.o blob.o $(LIBS) + +merge-cache: merge-cache.o read-cache.o + $(CC) $(CFLAGS) -o merge-cache merge-cache.o read-cache.o $(LIBS) + +read-cache.o: cache.h +show-diff.o: cache.h + +clean: + rm -f *.o $(PROG) + +backup: clean + cd .. ; tar czvf dircache.tar.gz dir-cache + + +Node-path: branches/left/README +Node-kind: file +Node-action: add +Node-copyfrom-rev: 18 +Node-copyfrom-path: branches/left-sub/README +Text-copy-source-md5: fdbcfb6be9afe1121862143f226b51cf +Text-copy-source-sha1: 1d1f5ea4ceb584337ffe59b8980d92e3b78dfef4 + + +Node-path: branches/left/bang +Node-kind: file +Node-action: add +Node-copyfrom-rev: 18 +Node-copyfrom-path: branches/left-sub/bang +Text-copy-source-md5: 34c28f1d2dc6a9adeccc4265bf7516cb +Text-copy-source-sha1: 0bc5bb345c0e71d28f784f12e0bd2d384c283062 + + +Node-path: branches/left/urkkk +Node-kind: file +Node-action: add +Node-copyfrom-rev: 18 +Node-copyfrom-path: branches/left-sub/urkkk +Text-copy-source-md5: 5889c8392e16251b0c80927607a03036 +Text-copy-source-sha1: 3934264d277a0cf886b6b1c7f2b9e56da2525302 + + +Revision-number: 23 +Prop-content-length: 126 +Content-length: 126 + +K 7 +svn:log +V 27 +(r23) Merge left to trunk 2 +K 10 +svn:author +V 4 +samv +K 8 +svn:date +V 27 +2009-12-19T16:18:02.212349Z PROPS-END Node-path: trunk Node-kind: dir Node-action: change -Prop-content-length: 54 -Content-length: 54 +Prop-content-length: 99 +Content-length: 99 K 13 svn:mergeinfo -V 19 -/branches/left:2-11 +V 64 +/branches/left:2-22 +/branches/left-sub:4-19 +/branches/right:2-17 +PROPS-END + + +Node-path: trunk/README +Node-kind: file +Node-action: add +Node-copyfrom-rev: 22 +Node-copyfrom-path: branches/left/README +Text-copy-source-md5: fdbcfb6be9afe1121862143f226b51cf +Text-copy-source-sha1: 1d1f5ea4ceb584337ffe59b8980d92e3b78dfef4 + + +Node-path: trunk/glurpp +Node-kind: file +Node-action: add +Node-copyfrom-rev: 22 +Node-copyfrom-path: branches/left/glurpp +Text-copy-source-md5: 14a169f628e0bb59df9c2160649d0a30 +Text-copy-source-sha1: ef7d929e52177767ecfcd28941f6b7f04b4131e3 + + +Node-path: trunk/urkkk +Node-kind: file +Node-action: add +Node-copyfrom-rev: 22 +Node-copyfrom-path: branches/left/urkkk +Text-copy-source-md5: 5889c8392e16251b0c80927607a03036 +Text-copy-source-sha1: 3934264d277a0cf886b6b1c7f2b9e56da2525302 + + +Node-path: trunk/wham_eth +Node-kind: file +Node-action: add +Node-copyfrom-rev: 22 +Node-copyfrom-path: branches/left/wham_eth +Text-copy-source-md5: 757bcd5818572ef3f9580052617c1c8b +Text-copy-source-sha1: b165019b005c199237ba822c4404e771e93b654a + + +Node-path: trunk/zlonk +Node-kind: file +Node-action: add +Node-copyfrom-rev: 22 +Node-copyfrom-path: branches/left/zlonk +Text-copy-source-md5: 8b9d8c7c2aaa6167e7d3407a773bbbba +Text-copy-source-sha1: 9716527ebd70a75c27625cacbeb2d897c6e86178 + + +Revision-number: 24 +Prop-content-length: 131 +Content-length: 131 + +K 7 +svn:log +V 32 +(r24) non-merge right to trunk 2 +K 10 +svn:author +V 4 +samv +K 8 +svn:date +V 27 +2009-12-19T16:18:02.672148Z +PROPS-END + +Node-path: trunk +Node-kind: dir +Node-action: change +Prop-content-length: 99 +Content-length: 99 + +K 13 +svn:mergeinfo +V 64 +/branches/left:2-22 +/branches/left-sub:4-19 +/branches/right:2-22 PROPS-END From 7d944c3399c4145293d599e1ddc76d1ac0c1e118 Mon Sep 17 00:00:00 2001 From: Sam Vilain Date: Sun, 20 Dec 2009 00:55:13 +1300 Subject: [PATCH 10/19] git-svn: memoize conversion of SVN merge ticket info to git commit ranges Each time the svn mergeinfo ticket changes, we look it up in the rev_map; when there are a lot of merged branches, this will result in many repeated lookups of the same information for subsequent commits. Arrange the slow part of the function so that it may be memoized, and memoize it. The more expensive revision walking operation can be memoized separately. [ew: changed "next" to "return" for function exit] Signed-off-by: Sam Vilain Acked-by: Eric Wong --- git-svn.perl | 91 +++++++++++++++++++++++++++++++--------------------- 1 file changed, 54 insertions(+), 37 deletions(-) diff --git a/git-svn.perl b/git-svn.perl index a6f5061c3c..1e106f064b 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -1634,6 +1634,7 @@ use Carp qw/croak/; use File::Path qw/mkpath/; use File::Copy qw/copy/; use IPC::Open3; +use Memoize; # core since 5.8.0, Jul 2002 my ($_gc_nr, $_gc_period); @@ -2994,6 +2995,55 @@ sub find_extra_svk_parents { } } +sub lookup_svn_merge { + my $uuid = shift; + my $url = shift; + my $merge = shift; + + my ($source, $revs) = split ":", $merge; + my $path = $source; + $path =~ s{^/}{}; + my $gs = Git::SVN->find_by_url($url.$source, $url, $path); + if ( !$gs ) { + warn "Couldn't find revmap for $url$source\n"; + return; + } + my @ranges = split ",", $revs; + my ($tip, $tip_commit); + my @merged_commit_ranges; + # find the tip + for my $range ( @ranges ) { + my ($bottom, $top) = split "-", $range; + $top ||= $bottom; + my $bottom_commit = + $gs->rev_map_get($bottom, $uuid) || + $gs->rev_map_get($bottom+1, $uuid); + my $top_commit; + for (; !$top_commit && $top >= $bottom; --$top) { + $top_commit = + $gs->rev_map_get($top, $uuid); + } + + unless ($top_commit and $bottom_commit) { + warn "W:unknown path/rev in svn:mergeinfo " + ."dirprop: $source:$range\n"; + next; + } + + push @merged_commit_ranges, + "$bottom_commit..$top_commit"; + + if ( !defined $tip or $top > $tip ) { + $tip = $top; + $tip_commit = $top_commit; + } + } + return ($tip_commit, @merged_commit_ranges); +} +BEGIN { + memoize 'lookup_svn_merge'; +} + # note: this function should only be called if the various dirprops # have actually changed sub find_extra_svn_parents { @@ -3008,44 +3058,11 @@ sub find_extra_svn_parents { my @merge_tips; my @merged_commit_ranges; my $url = $self->rewrite_root || $self->{url}; + my $uuid = $self->ra_uuid; for my $merge ( @merges ) { - my ($source, $revs) = split ":", $merge; - my $path = $source; - $path =~ s{^/}{}; - my $gs = Git::SVN->find_by_url($url.$source, $url, $path); - if ( !$gs ) { - warn "Couldn't find revmap for $url$source\n"; - next; - } - my @ranges = split ",", $revs; - my ($tip, $tip_commit); - # find the tip - for my $range ( @ranges ) { - my ($bottom, $top) = split "-", $range; - $top ||= $bottom; - my $bottom_commit = - $gs->rev_map_get($bottom, $self->ra_uuid) || - $gs->rev_map_get($bottom+1, $self->ra_uuid); - my $top_commit; - for (; !$top_commit && $top >= $bottom; --$top) { - $top_commit = - $gs->rev_map_get($top, $self->ra_uuid); - } - - unless ($top_commit and $bottom_commit) { - warn "W:unknown path/rev in svn:mergeinfo " - ."dirprop: $source:$range\n"; - next; - } - - push @merged_commit_ranges, - "$bottom_commit..$top_commit"; - - if ( !defined $tip or $top > $tip ) { - $tip = $top; - $tip_commit = $top_commit; - } - } + my ($tip_commit, @ranges) = + lookup_svn_merge( $uuid, $url, $merge ); + push @merged_commit_ranges, @ranges; unless (!$tip_commit or grep { $_ eq $tip_commit } @$parents ) { push @merge_tips, $tip_commit; From 33973a5b179278c563624fcb45c223f03031b242 Mon Sep 17 00:00:00 2001 From: Sam Vilain Date: Sun, 20 Dec 2009 05:22:42 +1300 Subject: [PATCH 11/19] git-svn: fix some mistakes with interpreting SVN mergeinfo commit ranges SVN's list of commit ranges in mergeinfo tickets is inclusive, whereas git commit ranges are exclusive on the left hand side. Also, the end points of the commit ranges may not exist; they simply delineate ranges of commits which may or may not exist. Fix these two mistakes. Signed-off-by: Sam Vilain Acked-by: Eric Wong --- git-svn.perl | 12 +++--------- t/t9151-svn-mergeinfo.sh | 2 +- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/git-svn.perl b/git-svn.perl index 1e106f064b..a4a45ef398 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -3015,14 +3015,8 @@ sub lookup_svn_merge { for my $range ( @ranges ) { my ($bottom, $top) = split "-", $range; $top ||= $bottom; - my $bottom_commit = - $gs->rev_map_get($bottom, $uuid) || - $gs->rev_map_get($bottom+1, $uuid); - my $top_commit; - for (; !$top_commit && $top >= $bottom; --$top) { - $top_commit = - $gs->rev_map_get($top, $uuid); - } + my $bottom_commit = $gs->find_rev_after( $bottom, 1, $top ); + my $top_commit = $gs->find_rev_before( $top, 1, $bottom ); unless ($top_commit and $bottom_commit) { warn "W:unknown path/rev in svn:mergeinfo " @@ -3031,7 +3025,7 @@ sub lookup_svn_merge { } push @merged_commit_ranges, - "$bottom_commit..$top_commit"; + "$bottom_commit^..$top_commit"; if ( !defined $tip or $top > $tip ) { $tip = $top; diff --git a/t/t9151-svn-mergeinfo.sh b/t/t9151-svn-mergeinfo.sh index dc3478fbbc..f6e00ea30b 100755 --- a/t/t9151-svn-mergeinfo.sh +++ b/t/t9151-svn-mergeinfo.sh @@ -33,7 +33,7 @@ test_expect_success 'svn non-merge merge commits did not become git merge commit [ -z "$bad_non_merges" ] ' -test_expect_failure 'everything got merged in the end' ' +test_expect_success 'everything got merged in the end' ' unmerged=$(git rev-list --all --not master) [ -z "$unmerged" ] ' From ea020cbd6aeb769d95e5c2dbffee4c81d6f92796 Mon Sep 17 00:00:00 2001 From: Sam Vilain Date: Sun, 20 Dec 2009 05:25:31 +1300 Subject: [PATCH 12/19] git-svn: exclude already merged tips using one rev-list call The old function would have to check all mentioned merge tips, every time that the mergeinfo ticket changed. This involved 1-2 rev-list operation for each listed mergeinfo line. If there are a lot of feature branches being merged into a trunk, this makes for a very expensive operation for detecting the new parents on every merge. This new version first uses a single 'rev-list' to figure out which commit ranges are already reachable from the parents. This is used to eliminate the already merged branches from the list. Signed-off-by: Sam Vilain Acked-by: Eric Wong --- git-svn.perl | 52 ++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 48 insertions(+), 4 deletions(-) diff --git a/git-svn.perl b/git-svn.perl index a4a45ef398..07d40ba81f 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -3038,6 +3038,41 @@ BEGIN { memoize 'lookup_svn_merge'; } +sub parents_exclude { + my $parents = shift; + my @commits = @_; + return unless @commits; + + my @excluded; + my $excluded; + do { + my @cmd = ('rev-list', "-1", @commits, "--not", @$parents ); + $excluded = command_oneline(@cmd); + if ( $excluded ) { + my @new; + my $found; + for my $commit ( @commits ) { + if ( $commit eq $excluded ) { + push @excluded, $commit; + $found++; + last; + } + else { + push @new, $commit; + } + } + die "saw commit '$excluded' in rev-list output, " + ."but we didn't ask for that commit (wanted: @commits --not @$parents)" + unless $found; + @commits = @new; + } + } + while ($excluded and @commits); + + return @excluded; +} + + # note: this function should only be called if the various dirprops # have actually changed sub find_extra_svn_parents { @@ -3050,23 +3085,32 @@ sub find_extra_svn_parents { # are now marked as merge, we can add the tip as a parent. my @merges = split "\n", $mergeinfo; my @merge_tips; - my @merged_commit_ranges; my $url = $self->rewrite_root || $self->{url}; my $uuid = $self->ra_uuid; + my %ranges; for my $merge ( @merges ) { my ($tip_commit, @ranges) = lookup_svn_merge( $uuid, $url, $merge ); - push @merged_commit_ranges, @ranges; unless (!$tip_commit or grep { $_ eq $tip_commit } @$parents ) { push @merge_tips, $tip_commit; + $ranges{$tip_commit} = \@ranges; } else { push @merge_tips, undef; } } + + my %excluded = map { $_ => 1 } + parents_exclude($parents, grep { defined } @merge_tips); + + # check merge tips for new parents + my @new_parents; for my $merge_tip ( @merge_tips ) { my $spec = shift @merges; - next unless $merge_tip; + next unless $merge_tip and $excluded{$merge_tip}; + + my $ranges = $ranges{$merge_tip}; + my @cmd = ('rev-list', "-1", $merge_tip, "--not", @$parents ); my ($msg_fh, $ctx) = command_output_pipe(@cmd); @@ -3076,7 +3120,7 @@ sub find_extra_svn_parents { } command_close_pipe($msg_fh, $ctx); if ( $new ) { - push @cmd, @merged_commit_ranges; + push @cmd, @$ranges; my ($msg_fh, $ctx) = command_output_pipe(@cmd); my $unmerged; while ( <$msg_fh> ) { From 7a955a5365d9ebd5e12c12ed926b2b51b61c02ee Mon Sep 17 00:00:00 2001 From: Sam Vilain Date: Sun, 20 Dec 2009 05:26:26 +1300 Subject: [PATCH 13/19] git-svn: detect cherry-picks correctly. The old function was incorrect; in some instances it marks a cherry picked range as a merged branch (because of an incorrect assumption that 'rev-list COMMIT --not RANGE' would work). This is replaced with a function which should detect them correctly, memoized to limit the expense of dealing with branches with many cherry picks to one 'merge-base' call per merge, per branch which used cherry picking. Signed-off-by: Sam Vilain Acked-by: Eric Wong --- git-svn.perl | 85 +++++++++++++++++++++++++++++----------- t/t9151-svn-mergeinfo.sh | 4 +- 2 files changed, 65 insertions(+), 24 deletions(-) diff --git a/git-svn.perl b/git-svn.perl index 07d40ba81f..4ea3ac63da 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -3034,8 +3034,35 @@ sub lookup_svn_merge { } return ($tip_commit, @merged_commit_ranges); } + +sub _rev_list { + my ($msg_fh, $ctx) = command_output_pipe( + "rev-list", @_, + ); + my @rv; + while ( <$msg_fh> ) { + chomp; + push @rv, $_; + } + command_close_pipe($msg_fh, $ctx); + @rv; +} + +sub check_cherry_pick { + my $base = shift; + my $tip = shift; + my @ranges = @_; + my %commits = map { $_ => 1 } + _rev_list("--no-merges", $tip, "--not", $base); + for my $range ( @ranges ) { + delete @commits{_rev_list($range)}; + } + return (keys %commits); +} + BEGIN { memoize 'lookup_svn_merge'; + memoize 'check_cherry_pick'; } sub parents_exclude { @@ -3111,32 +3138,46 @@ sub find_extra_svn_parents { my $ranges = $ranges{$merge_tip}; - my @cmd = ('rev-list', "-1", $merge_tip, - "--not", @$parents ); - my ($msg_fh, $ctx) = command_output_pipe(@cmd); - my $new; - while ( <$msg_fh> ) { - $new=1;last; + # check out 'new' tips + my $merge_base = command_oneline( + "merge-base", + @$parents, $merge_tip, + ); + + # double check that there are no missing non-merge commits + my (@incomplete) = check_cherry_pick( + $merge_base, $merge_tip, + @$ranges, + ); + + if ( @incomplete ) { + warn "W:svn cherry-pick ignored ($spec) - missing " + .@incomplete." commit(s) (eg $incomplete[0])\n"; + } else { + warn + "Found merge parent (svn:mergeinfo prop): ", + $merge_tip, "\n"; + push @new_parents, $merge_tip; } - command_close_pipe($msg_fh, $ctx); - if ( $new ) { - push @cmd, @$ranges; - my ($msg_fh, $ctx) = command_output_pipe(@cmd); - my $unmerged; - while ( <$msg_fh> ) { - $unmerged=1;last; - } - command_close_pipe($msg_fh, $ctx); - if ( $unmerged ) { - warn "W:svn cherry-pick ignored ($spec)\n"; - } else { - warn - "Found merge parent (svn:mergeinfo prop): ", - $merge_tip, "\n"; - push @$parents, $merge_tip; + } + + # cater for merges which merge commits from multiple branches + if ( @new_parents > 1 ) { + for ( my $i = 0; $i <= $#new_parents; $i++ ) { + for ( my $j = 0; $j <= $#new_parents; $j++ ) { + next if $i == $j; + next unless $new_parents[$i]; + next unless $new_parents[$j]; + my $revs = command_oneline( + "rev-list", "-1", "$i..$j", + ); + if ( !$revs ) { + undef($new_parents[$i]); + } } } } + push @$parents, grep { defined } @new_parents; } sub make_log_entry { diff --git a/t/t9151-svn-mergeinfo.sh b/t/t9151-svn-mergeinfo.sh index f6e00ea30b..359eeaa738 100755 --- a/t/t9151-svn-mergeinfo.sh +++ b/t/t9151-svn-mergeinfo.sh @@ -15,13 +15,13 @@ test_expect_success 'load svn dump' " git svn fetch --all " -test_expect_failure 'all svn merges became git merge commits' ' +test_expect_success 'all svn merges became git merge commits' ' unmarked=$(git rev-list --parents --all --grep=Merge | grep -v " .* " | cut -f1 -d" ") [ -z "$unmarked" ] ' -test_expect_failure 'cherry picks did not become git merge commits' ' +test_expect_success 'cherry picks did not become git merge commits' ' bad_cherries=$(git rev-list --parents --all --grep=Cherry | grep " .* " | cut -f1 -d" ") [ -z "$bad_cherries" ] From 063681d72e60e80cd14576037728b395ed42e330 Mon Sep 17 00:00:00 2001 From: Andrew Myrick Date: Mon, 21 Dec 2009 14:22:54 -0800 Subject: [PATCH 14/19] git-svn: Remove obsolete MAXPARENT check Change git-svn not to impose a limit of 16 parents on a merge. This limit in git-svn artificially prevents cloning svn repositories that contain commits with more than 16 merge parents. The limit was removed from builtin-commit-tree.c for git v1.6.0 in commit ef98c5cafb3e799b1568bb843fcd45920dc62f16, so there is no need to check for it it in git-svn. Signed-off-by: Andrew Myrick Acked-by: Eric Wong --- git-svn.perl | 6 ------ 1 file changed, 6 deletions(-) diff --git a/git-svn.perl b/git-svn.perl index 4ea3ac63da..36709607f2 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -2451,12 +2451,6 @@ sub get_commit_parents { next if $seen{$p}; $seen{$p} = 1; push @ret, $p; - # MAXPARENT is defined to 16 in commit-tree.c: - last if @ret >= 16; - } - if (@tmp) { - die "r$log_entry->{revision}: No room for parents:\n\t", - join("\n\t", @tmp), "\n"; } @ret; } From c8cba79181abc139d7cba364bf868875426fc2c1 Mon Sep 17 00:00:00 2001 From: David Reiss Date: Tue, 22 Dec 2009 10:51:41 -0800 Subject: [PATCH 15/19] Prevent git blame from segfaulting on a missing author name The human-readable author and committer name can be missing from commits imported from foreign SCM interfaces. Make sure we parse the "author" and "committer" line a bit more leniently and avoid segfaulting by assuming the name always exists. Signed-off-by: David Reiss Signed-off-by: Junio C Hamano --- builtin-blame.c | 13 ++++++++++--- t/t8003-blame.sh | 13 +++++++++++++ 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/builtin-blame.c b/builtin-blame.c index dd16b22297..98e818ce6a 100644 --- a/builtin-blame.c +++ b/builtin-blame.c @@ -1305,6 +1305,7 @@ static void get_ac_line(const char *inbuf, const char *what, error_out: /* Ugh */ *tz = "(unknown)"; + strcpy(person, *tz); strcpy(mail, *tz); *time = 0; return; @@ -1314,20 +1315,26 @@ static void get_ac_line(const char *inbuf, const char *what, tmp = person; tmp += len; *tmp = 0; - while (*tmp != ' ') + while (person < tmp && *tmp != ' ') tmp--; + if (tmp <= person) + goto error_out; *tz = tmp+1; tzlen = (person+len)-(tmp+1); *tmp = 0; - while (*tmp != ' ') + while (person < tmp && *tmp != ' ') tmp--; + if (tmp <= person) + goto error_out; *time = strtoul(tmp, NULL, 10); timepos = tmp; *tmp = 0; - while (*tmp != ' ') + while (person < tmp && *tmp != ' ') tmp--; + if (tmp <= person) + return; mailpos = tmp + 1; *tmp = 0; maillen = timepos - tmp; diff --git a/t/t8003-blame.sh b/t/t8003-blame.sh index 13c25f1d52..ad834f200a 100755 --- a/t/t8003-blame.sh +++ b/t/t8003-blame.sh @@ -144,4 +144,17 @@ test_expect_success 'blame path that used to be a directory' ' git blame HEAD^.. -- path ' +test_expect_success 'blame to a commit with no author name' ' + TREE=`git rev-parse HEAD:` + cat >badcommit < 1234567890 +0000 +committer David Reiss 1234567890 +0000 + +some message +EOF + COMMIT=`git hash-object -t commit -w badcommit` + git --no-pager blame $COMMIT -- uno >/dev/null +' + test_done From 0fe19753f26e2747f48d1ec6a1761006d75c2d71 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 22 Dec 2009 12:15:40 -0800 Subject: [PATCH 16/19] git svn: lookup new parents correctly from svn:mergeinfo This appears to be a trivial case where array indices were being passed to git rev-list, instead of the contents stored in the array itself. Signed-off-by: Eric Wong --- git-svn.perl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/git-svn.perl b/git-svn.perl index 36709607f2..dba0d12b00 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -3163,7 +3163,8 @@ sub find_extra_svn_parents { next unless $new_parents[$i]; next unless $new_parents[$j]; my $revs = command_oneline( - "rev-list", "-1", "$i..$j", + "rev-list", "-1", + "$new_parents[$i]..$new_parents[$j]", ); if ( !$revs ) { undef($new_parents[$i]); From 150d38c4f3733b38c2c212469afa162a55e0e99d Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 22 Dec 2009 22:40:18 -0800 Subject: [PATCH 17/19] git svn: branch/tag commands detect username in URLs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit svn+ssh:// repositories often have userinfo embedded in the URL which were stripped out of the "git-svn-id:" trailers. Since the SVN::Client::copy function takes userinfo into account when matching URLs for SVN repositories, we need to retrieve the full URL with embedded userinfo in it to avoid mismatched URLs. Tested-by: Florian Köberle Signed-off-by: Eric Wong --- git-svn.perl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/git-svn.perl b/git-svn.perl index dba0d12b00..650c9e5f02 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -663,7 +663,8 @@ sub cmd_branch { } $head ||= 'HEAD'; - my ($src, $rev, undef, $gs) = working_head_info($head); + my (undef, $rev, undef, $gs) = working_head_info($head); + my $src = $gs->full_url; my $remote = Git::SVN::read_all_remotes()->{$gs->{repo_id}}; my $allglobs = $remote->{ $_tag ? 'tags' : 'branches' }; From b7f44fdf27c1f5dfee099c504a55b62674e7567b Mon Sep 17 00:00:00 2001 From: Robert Zeh Date: Wed, 23 Dec 2009 11:54:11 -0600 Subject: [PATCH 18/19] git svn: add test for a git svn gc followed by a git svn mkdirs git svn gc will compress the unhandled.log files that git svn mkdirs reads, causing git svn mkdirs to skip directory creation. [ew: trivial whitespace cleanups] Acked-by: Eric Wong Signed-off-by: Robert Zeh --- t/t9152-svn-empty-dirs-after-gc.sh | 40 ++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100755 t/t9152-svn-empty-dirs-after-gc.sh diff --git a/t/t9152-svn-empty-dirs-after-gc.sh b/t/t9152-svn-empty-dirs-after-gc.sh new file mode 100755 index 0000000000..301e779709 --- /dev/null +++ b/t/t9152-svn-empty-dirs-after-gc.sh @@ -0,0 +1,40 @@ +#!/bin/sh +# +# Copyright (c) 2009 Robert Zeh + +test_description='git svn creates empty directories, calls git gc, makes sure they are still empty' +. ./lib-git-svn.sh + +test_expect_success 'initialize repo' ' + for i in a b c d d/e d/e/f "weird file name" + do + svn_cmd mkdir -m "mkdir $i" "$svnrepo"/"$i" + done +' + +test_expect_success 'clone' 'git svn clone "$svnrepo" cloned' + +test_expect_success 'git svn gc runs' ' + ( + cd cloned && + git svn gc + ) +' + +test_expect_success 'git svn mkdirs recreates empty directories after git svn gc' ' + ( + cd cloned && + rm -r * && + git svn mkdirs && + for i in a b c d d/e d/e/f "weird file name" + do + if ! test -d "$i" + then + echo >&2 "$i does not exist" + exit 1 + fi + done + ) +' + +test_done From 902f235378cb2b2f6dd5dd664b9630c95321f0ae Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 23 Dec 2009 11:58:52 -0800 Subject: [PATCH 19/19] Git 1.6.6 Signed-off-by: Junio C Hamano --- Documentation/RelNotes-1.6.6.txt | 3 --- Documentation/git.txt | 5 +++++ GIT-VERSION-GEN | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Documentation/RelNotes-1.6.6.txt b/Documentation/RelNotes-1.6.6.txt index 75ef0b8b91..04e205c457 100644 --- a/Documentation/RelNotes-1.6.6.txt +++ b/Documentation/RelNotes-1.6.6.txt @@ -217,9 +217,6 @@ Updates since v1.6.5 * Author names shown in gitweb output are links to search commits by the author. - -(developers) - Fixes since v1.6.5 ------------------ diff --git a/Documentation/git.txt b/Documentation/git.txt index 51ca39291f..352c23019f 100644 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@ -43,6 +43,11 @@ unreleased) version of git, that is available from 'master' branch of the `git.git` repository. Documentation for older releases are available here: +* link:v1.6.6/git.html[documentation for release 1.6.6] + +* release notes for + link:RelNotes-1.6.6.txt[1.6.6]. + * link:v1.6.5.7/git.html[documentation for release 1.6.5.7] * release notes for diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index 22f2461636..1628d986fe 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -1,7 +1,7 @@ #!/bin/sh GVF=GIT-VERSION-FILE -DEF_VER=v1.6.6-rc4.GIT +DEF_VER=v1.6.6 LF=' '