From b4b3360078e758221db3f7b496e35ccb43364151 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Sun, 13 Jun 2010 06:27:43 -0500 Subject: [PATCH 1/3] git-svn: strip off leading slashes on --trunk argument The following command git svn clone \ -r9500:10006 \ svn://svn.debian.org/svn/pkg-games/packages \ --trunk=/trunk/freedoom \ --branches=/branches/freedoom \ --tags=/tags/freedoom \ freedoom.git.2009091 produces strange results: With v1.6.3.3 (and perhaps earlier versions), this would fetch up to and including r9978 (the last revision of the no_iwad_alternatives branch before it was deleted), check it out, and prematurely declare success, leaving out some commits to the trunk (r9984, r9985, r10006) from after the branch was merged. With v1.6.5-rc0~74 (svn: allow branches outside of refs/remotes, 2009-08-11) and later, this fetches up to and including r9978 and then attempts a post-fetch checkout and fails. r9978 = 25f0920175c395f0f22f54ae7a2318147f745274 (refs/remotes/no_iwad_alternatives) fatal: refs/remotes/trunk: not a valid SHA1 update-ref refs/heads/master refs/remotes/trunk: command returned error: 128 Checking .git/config reveals fetch = packages//trunk/freedoom:refs/remotes/trunk And with both 1.6.3.3 and 1.7.1, using --trunk=trunk/freedom without the leading slash (/) works fine. Moral: git-svn needs to scrub an initial / from $_trunk and related arguments it receives. Make it so. Reported-by: Jon Dowland Signed-off-by: Jonathan Nieder Acked-by: Eric Wong --- git-svn.perl | 1 + 1 file changed, 1 insertion(+) diff --git a/git-svn.perl b/git-svn.perl index 09c4ca56f0..80ab45065e 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -963,6 +963,7 @@ sub cmd_multi_init { } do_git_init_db(); if (defined $_trunk) { + $_trunk =~ s#^/+##; my $trunk_ref = 'refs/remotes/' . $_prefix . 'trunk'; # try both old-style and new-style lookups: my $gs_trunk = eval { Git::SVN->new($trunk_ref) }; From b1a954a37cea7d5a0a123758f6c2ad9005d4481e Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 14 Jun 2010 04:31:10 +0000 Subject: [PATCH 2/3] git svn: avoid unnecessary '/' in paths for SVN svn:// servers are more picky regarding redundant slashes than file:// and http(s)://-backed respositories. Since the last commit, we avoid putting unnecessary slashes in $GIT_CONFIG, but this doesn't help users who are already set up that way. Signed-off-by: Eric Wong --- git-svn.perl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/git-svn.perl b/git-svn.perl index 80ab45065e..19d6848d0e 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -2055,6 +2055,9 @@ sub new { "\":$ref_id\$\" in config\n"; ($self->{path}, undef) = split(/\s*:\s*/, $fetch); } + $self->{path} =~ s{/+}{/}g; + $self->{path} =~ s{\A/}{}; + $self->{path} =~ s{/\z}{}; $self->{url} = command_oneline('config', '--get', "svn-remote.$repo_id.url") or die "Failed to read \"svn-remote.$repo_id.url\" in config\n"; From 6068cdcc832040ac644c56953be0670bb09afd12 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Mon, 14 Jun 2010 09:53:02 -0700 Subject: [PATCH 3/3] Update draft release notes to 1.7.2 It is loooong overdue. Signed-off-by: Junio C Hamano --- Documentation/RelNotes-1.7.2.txt | 121 +++++++++++++++++++++++++++---- 1 file changed, 106 insertions(+), 15 deletions(-) diff --git a/Documentation/RelNotes-1.7.2.txt b/Documentation/RelNotes-1.7.2.txt index 37781b4f14..2dea6ffcf6 100644 --- a/Documentation/RelNotes-1.7.2.txt +++ b/Documentation/RelNotes-1.7.2.txt @@ -4,18 +4,6 @@ Git v1.7.2 Release Notes (draft) Updates since v1.7.1 -------------------- - * After "git apply --whitespace=fix" removed trailing blank lines in an - patch in a patch series, it failed to apply later patches that depend - on the presense of such blank lines. - - * The output from the textconv filter used by "git diff" can be cached to - speed up their reuse. - - * "git send-email" learned --smtp-domain option to specify the domainname - used in the EHLO/HELO exchange. - - * "git revert" learned --strategy option to specify the merge strategy. - * The whitespace rules used in "git apply --whitespace" and "git diff" gained a new member in the family (tab-in-indent) to help projects with policy to indent only with spaces. @@ -24,17 +12,120 @@ Updates since v1.7.1 request can first go to a URL without username, get a 401 response and then the client will ask for the username to use. + * When working from a subdirectory, by default, git does not look for its + metadirectory ".git" across filesystems, primarily to help people who + have invocations of git in their custom PS1 prompts, as being outside + of a git repository would look for ".git" all the way up to the root + directory, and NFS mounts are often slow. DISCOVERY_ACROSS_FILESYSTEM + environment variable can be used to tell git not to stop at a + filesystem boundary. + + * "git" wrapper learned "-c name=value" option to override configuration + variable from the command line. + + * After "git apply --whitespace=fix" removed trailing blank lines in an + patch in a patch series, it failed to apply later patches that depend + on the presense of such blank lines. + + * "git checkout --orphan newbranch" is similar to "-b newbranch" but + prepares to create a root commit that is not connected to any existing + commit. + + * "git commit --amend" on a commit with an invalid author-name line that + lacks the display name didn't work (fb7749e4). + + * "git cvsserver" can be told to use pserver; its password file can be + stored outside the repository. + + * "git describe" tie-breaks tags that point at the same commit better by + paying attention to the tagger date (newer ones are preferred). + + * The output from the textconv filter used by "git diff" can be cached to + speed up their reuse. + + * "git diff --color" did not paint extended diff headers per line + (i.e. the coloring escape sequence didn't end at the end of line), + which confused "less -R". + + * "git diff --word-diff=" extends the existing "--color-words" + option, making it more useful in color-challenged environments. + + * The regexp to detect function headers used by "git diff" for PHP has + been enhanced for visibility modifiers (public, protected, etc.) to + better support PHP5. + + * "git fetch" over HTTP verifies the downloaded packfiles more robustly. + + * "git for-each-ref" learned "%(objectname:short)" that gives the object + name abbreviated. + + * Various options to "git grep" (e.g. --count, --name-only) work better + with binary files. + + * The memory usage by "git index-pack" (run during "git fetch" and "git + push") got leaner. + + * "git log --follow " follows across copies (it used to only follow + renames). This may make the processing more expensive. + + * "git notes prune" learned "-n" (dry-run) and "-v" options, similar to + what "git prune" has. + + * "git patch-id" can be fed a mbox without getting confused by the + signature line in the format-patch output. + + * "git revert" learned --strategy option to specify the merge strategy. + + * "git send-email" learned --smtp-domain option to specify the domainname + used in the EHLO/HELO exchange. + + * "git status [-s] --ignored" can be used to list ignored paths. + + * Various "gitweb" enhancements and clean-ups, including syntax + highlighting. + Fixes since v1.7.1 ------------------ - * In 1.7.1, "git status" stopped refreshing the index by mistake. - All of the fixes in v1.7.1.X maintenance series are included in this release, unless otherwise noted. + * We didn't recognize timezone "Z" as a synonym for "UTC" (75b37e70). + + * In 1.7.1, "git status" stopped refreshing the index by mistake + (e251a7b3^2). + + * We used to mistakenly think "../work" is a subdirectory of the current + directory when we are in "../work-xyz" (490544b). + + * "git checkout" and "git rebase" overwrote paths that are marked "assume + unchanged" (aecda37c). + + * "git clone/fetch/pull" issued an incorrect error message when a ref and + a symref that points to the ref were updated at the same time. This + obviously would update them to the same value, and should not result in + an error condition (da3efdb). + + * "git clone" did not configure remote.origin.url correctly for bare + clones (df61c889). + + * "git diff" used to tell underlying xdiff machinery to work very hard to + minimize the output, but this often was spending too many extra cycles + for very little gain (582aa00). + + * "git pull" accepted "--dry-run", gave it to underlying "git fetch" but + ignored the option itself, resulting in a bogus attempt to merge + unrelated commit (29609e68). + + * "git reset --hard" started from a wrong directory and a working tree in + a nonstandard location is in use got confused (560fb6a1). + + * "git stash" incorrectly lost paths in the working tree that were + previously removed from the index (7aa5d43). + -- exec >/var/tmp/1 -O=v1.7.1-77-gb751157 +O=v1.7.1-336-g0925c02 echo O=$(git describe master) git shortlog --no-merges master ^maint ^$O