Merge git://git.bogomips.org/git-svn
authorJunio C Hamano <gitster@pobox.com>
Sun, 18 Nov 2007 00:40:03 +0000 (16:40 -0800)
committerJunio C Hamano <gitster@pobox.com>
Sun, 18 Nov 2007 00:40:03 +0000 (16:40 -0800)
* git://git.bogomips.org/git-svn:
git-svn: Fix a typo and add a comma in an error message in git-svn
git-svn log: handle unreachable revisions like "svn log"
git-svn log: include commit log for the smallest revision in a range
git-svn log: fix ascending revision ranges
git-svn's dcommit must use subversion's config
git-svn: add tests for command-line usage of init and clone commands

Documentation/RelNotes-1.5.3.6.txt
Documentation/RelNotes-1.5.4.txt
Documentation/git-clone.txt
Documentation/urls.txt
Documentation/user-manual.txt
git-send-email.perl
t/t7004-tag.sh
t/t9101-git-svn-props.sh
index 06e44f7735fde8aed8d0268c1034f47799dd8287..c9f948ec0e3586919cedbc4cc26e5c5a3d49de4d 100644 (file)
@@ -9,13 +9,44 @@ Fixes since v1.5.3.5
  * git-svn dcommit used to clobber when sending a series of
    patches;
 
+ * git-svn dcommit failed after attempting to rebase when
+   started with a dirty index; now it stops upfront.
+
  * git-grep sometimes refused to work when your index was
    unmerged;
 
+ * git-hash-object did not honor configuration variables, such as
+   core.compression.
+
+ * git-index-pack choked on a huge pack on 32-bit machines, even when
+   large file offsets are supported.
+
+ * atom feeds from git-web said "10" for the month of November.
+
+ * a memory leak in commit walker was plugged.
+
+ * When git-send-email inserted the original author's From:
+   address in body, it did not mark the message with
+   Content-type: as needed.
+
+ * git-revert and git-cherry-pick incorrectly refused to start
+   when the work tree was dirty.
+
+ * git-clean did not honor core.excludesfile configuration.
+
+ * git-add mishandled ".gitignore" files when applying them to
+   subdirectories.
+
+ * While importing a too branchy history, git-fastimport did not
+   honor delta depth limit properly.
+
+ * Support for zlib implementations that lack ZLIB_VERNUM and definition
+   of deflateBound() has been added.
+
  * Quite a lot of documentation clarifications.
 
 --
 exec >/var/tmp/1
-O=v1.5.3.5-32-gcb6c162
+O=v1.5.3.5-57-gb574c8d
 echo O=`git describe refs/heads/maint`
 git shortlog --no-merges $O..refs/heads/maint
index 93fb9c914c38388b3b1db11d2b6e63183a9bb952..229d773423f9a88a9aefb6594e69b510d054d1bc 100644 (file)
@@ -32,6 +32,10 @@ Updates since v1.5.3
    (read: safer than the usual one) after the user accumulates
    too many loose objects.
 
+ * You need to explicitly set clean.requireForce to true to allow
+   git-clean to do any damage now (the configuration variable used
+   to default to false).
+
  * git-push has been rewritten in C.
 
  * git-push learned --dry-run option to show what would happen
@@ -56,7 +60,28 @@ Updates since v1.5.3
 
  * git-bisect learned "skip" action to mark untestable commits.
 
- * rename detection diff family, while detecting exact matches,
+ * git-format-patch learned "format.numbered" configuration variable
+   to automatically turn --numbered option on when more than one
+   commits are formatted.
+
+ * git-ls-files learned "--exclude-standard" to use the canned
+   set of exclude files.
+
+ * git-rebase now detaches head during its operation, so after a
+   successful "git rebase" operation, the reflog entry branch@{1}
+   for the current branch points at the commit before the rebase
+   was started.
+
+ * "git-tag -a -f existing" begins the editor session using the
+   existing annotation message.
+
+ * "git cvsexportcommit" learned -w option to specify and switch
+   to the CVS working directory.
+
+ * Output processing for '--pretty=format:<user format>' has
+   been optimized.
+
+ * Rename detection diff family, while detecting exact matches,
    has been greatly optimized.
 
  * Example update and post-receive hooks have been improved.
@@ -77,8 +102,11 @@ Fixes since v1.5.3
 All of the fixes in v1.5.3 maintenance series are included in
 this release, unless otherwise noted.
 
+ * git-svn talking with the SVN over http will correctly quote branch
+   and project names.
+
 --
 exec >/var/tmp/1
-O=v1.5.3.5-618-g5d4138a
+O=v1.5.3.5-736-geb9d2b9
 echo O=`git describe refs/heads/master`
 git shortlog --no-merges $O..refs/heads/master ^refs/heads/maint
index 14e58f3866e3a4e7d1da01753cb68082e88ae2f6..c90bcece24c0fcbf9513af7808f6d0d13846c528 100644 (file)
@@ -130,6 +130,7 @@ OPTIONS
        for "host.xz:foo/.git").  Cloning into an existing directory
        is not allowed.
 
+:git-clone: 1
 include::urls.txt[]
 
 Examples
index e67f9140ab6be15499b60a8a87ec524a5357a284..4f667382ec1b3a93871c8b2beb31111278ec27b8 100644 (file)
@@ -36,5 +36,11 @@ To sync with a local directory, you can use:
 - file:///path/to/repo.git/
 ===============================================================
 
+ifndef::git-clone[]
 They are mostly equivalent, except when cloning.  See
 gitlink:git-clone[1] for details.
+endif::git-clone[]
+
+ifdef::git-clone[]
+They are equivalent, except the former implies --local option.
+endif::git-clone[]
index c7cfbbccfc941db891ce855c30a55e0f28de87c0..518b7b5c9e283eccd20ce2d84ea85f107c98ca39 100644 (file)
@@ -1567,9 +1567,9 @@ old history using, for example,
 $ git log master@{1}
 -------------------------------------------------
 
-This lists the commits reachable from the previous version of the head.
-This syntax can be used with any git command that accepts a commit,
-not just with git log.  Some other examples:
+This lists the commits reachable from the previous version of the
+"master" branch head.  This syntax can be used with any git command
+that accepts a commit, not just with git log.  Some other examples:
 
 -------------------------------------------------
 $ git show master@{2}          # See where the branch pointed 2,
index f9bd2e5a9176ccf7dd8e2ce15233d2d93f9222ec..fd0a4ad0c24dfedd2fea278733d8f6cff59b2eb5 100755 (executable)
@@ -514,11 +514,13 @@ sub make_message_id
 
 sub unquote_rfc2047 {
        local ($_) = @_;
-       if (s/=\?utf-8\?q\?(.*)\?=/$1/g) {
+       my $encoding;
+       if (s/=\?([^?]+)\?q\?(.*)\?=/$2/g) {
+               $encoding = $1;
                s/_/ /g;
                s/=([0-9A-F]{2})/chr(hex($1))/eg;
        }
-       return "$_";
+       return wantarray ? ($_, $encoding) : $_;
 }
 
 # use the simplest quoting being able to handle the recipient
@@ -667,6 +669,9 @@ sub send_message
        open(F,"<",$t) or die "can't open file $t";
 
        my $author = undef;
+       my $author_encoding;
+       my $has_content_type;
+       my $body_encoding;
        @cc = @initial_cc;
        @xh = ();
        my $input_format = undef;
@@ -692,12 +697,20 @@ sub send_message
                                                next if ($suppress_from);
                                        }
                                        elsif ($1 eq 'From') {
-                                               $author = unquote_rfc2047($2);
+                                               ($author, $author_encoding)
+                                                 = unquote_rfc2047($2);
                                        }
                                        printf("(mbox) Adding cc: %s from line '%s'\n",
                                                $2, $_) unless $quiet;
                                        push @cc, $2;
                                }
+                               elsif (/^Content-type:/i) {
+                                       $has_content_type = 1;
+                                       if (/charset="?[^ "]+/) {
+                                               $body_encoding = $1;
+                                       }
+                                       push @xh, $_;
+                               }
                                elsif (!/^Date:\s/ && /^[-A-Za-z]+:\s+\S/) {
                                        push @xh, $_;
                                }
@@ -756,6 +769,21 @@ sub send_message
 
        if (defined $author) {
                $message = "From: $author\n\n$message";
+               if (defined $author_encoding) {
+                       if ($has_content_type) {
+                               if ($body_encoding eq $author_encoding) {
+                                       # ok, we already have the right encoding
+                               }
+                               else {
+                                       # uh oh, we should re-encode
+                               }
+                       }
+                       else {
+                               push @xh,
+                                 'MIME-Version: 1.0',
+                                 "Content-Type: text/plain; charset=$author_encoding";
+                       }
+               }
        }
 
        send_message();
index 096fe33b07a79188dd178468f25375ff8f21636d..5f7e388d7add06b8392997037a86c4d0f8524ceb 100755 (executable)
@@ -1004,10 +1004,20 @@ test_expect_failure \
        'verify signed tag fails when public key is not present' \
        'git-tag -v signed-tag'
 
+test_expect_failure \
+       'git-tag -a fails if tag annotation is empty' '
+       GIT_EDITOR=cat git tag -a initial-comment
+'
+
 test_expect_success \
        'message in editor has initial comment' '
-       GIT_EDITOR=cat git tag -a initial-comment > actual || true &&
-       test $(sed -n "/^\(#\|\$\)/p" actual | wc -l) -gt 0
+       GIT_EDITOR=cat git tag -a initial-comment > actual
+       # check the first line --- should be empty
+       first=$(sed -e 1q <actual) &&
+       test -z "$first" &&
+       # remove commented lines from the remainder -- should be empty
+       rest=$(sed -e 1d -e '/^#/d' <actual) &&
+       test -z "$rest"
 '
 
 get_tag_header reuse $commit commit $time >expect
index 3c83127a0e862dd89837755103a97ed967c80e0b..d7a704754ea13f17c098e56a7b068cb4f44c1fd0 100755 (executable)
@@ -48,7 +48,7 @@ EOF
        printf "\r\n" > empty_crlf
        a_empty_crlf=`git-hash-object -w empty_crlf`
 
-       svn import -m 'import for git-svn' . "$svnrepo" >/dev/null
+       svn import --no-auto-props -m 'import for git-svn' . "$svnrepo" >/dev/null
 cd ..
 
 rm -rf import