git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [ANNOUNCE] GIT 1.5.5-rc2
@ 2008-03-28  6:30 Junio C Hamano
  2008-03-28 18:13 ` Jeff King
  0 siblings, 1 reply; 33+ messages in thread
From: Junio C Hamano @ 2008-03-28  6:30 UTC (permalink / raw)
  To: git

GIT 1.5.5-rc2 was tagged tonight, and it is available from the usual
places.

  http://www.kernel.org/pub/software/scm/git/

  git-1.5.5.rc2.tar.{gz,bz2}			(tarball)
  git-htmldocs-1.5.5.rc2.tar.{gz,bz2}		(preformatted docs)
  git-manpages-1.5.5.rc2.tar.{gz,bz2}		(preformatted docs)
  testing/git-*-1.5.5.rc2-1.$arch.rpm           (RPM)

The draft release notes as of tonight follows.

GIT v1.5.5 Release Notes
========================

Updates since v1.5.4
--------------------

(subsystems)

 * Comes with git-gui 0.9.3.

(portability)

 * We shouldn't ask for BSD group ownership semantics by setting g+s bit
   on directories on older BSD systems that refuses chmod() by non root
   users.  BSD semantics is the default there anyway.

 * Bunch of portability improvement patches coming from an effort to port
   to Solaris has been applied.

(performance)

 * On platforms with suboptimal qsort(3) implementation, there
   is an option to use more reasonable substitute we ship with
   our software.

 * New configuration variable "pack.packsizelimit" can be used
   in place of command line option --max-pack-size.

 * "git fetch" over the native git protocol used to make a
   connection to find out the set of current remote refs and
   another to actually download the pack data.  We now use only
   one connection for these tasks.

 * "git commit" does not run lstat(2) more than necessary
   anymore.

(usability, bells and whistles)

 * Bash completion script (in contrib) are aware of more commands and
   options.

 * You can be warned when core.autocrlf conversion is applied in
   such a way that results in an irreversible conversion.

 * A catch-all "color.ui" configuration variable can be used to
   enable coloring of all color-capable commands, instead of
   individual ones such as "color.status" and "color.branch".

 * The commands refused to take absolute pathnames where they
   require pathnames relative to the work tree or the current
   subdirectory.  They now can take absolute pathnames in such a
   case as long as the pathnames do not refer outside of the
   work tree.  E.g. "git add $(pwd)/foo" now works.

 * Error messages used to be sent to stderr, only to get hidden,
   when $PAGER was in use.  They now are sent to stdout along
   with the command output to be shown in the $PAGER.

 * A pattern "foo/" in .gitignore file now matches a directory
   "foo".  Pattern "foo" also matches as before.

 * bash completion's prompt helper function can talk about
   operation in-progress (e.g. merge, rebase, etc.).

 * Configuration variables "url.<usethis>.insteadof = <otherurl>" can be
   used to tell "git-fetch" and "git-push" to use different URL than what
   is given from the command line.

 * "git add -i" behaves better even before you make an initial commit.

 * "git am" refused to run from a subdirectory without a good reason.

 * After "git apply --whitespace=fix" fixes whitespace errors in a patch,
   a line before the fix can appear as a context or preimage line in a
   later patch, causing the patch not to apply.  The command now knows to
   see through whitespace fixes done to context lines to successfully
   apply such a patch series.

 * "git branch" (and "git checkout -b") to branch from a local branch can
   optionally set "branch.<name>.merge" to mark the new branch to build on
   the other local branch, when "branch.autosetupmerge" is set to
   "always", or when passing the command line option "--track" (this option
   was ignored when branching from local branches).  By default, this does
   not happen when branching from a local branch.

 * "git checkout" to switch to a branch that has "branch.<name>.merge" set
   (i.e. marked to build on another branch) reports how much the branch
   and the other branch diverged.

 * When "git checkout" has to update a lot of paths, it used to be silent
   for 4 seconds before it showed any progress report.  It is now a bit
   more impatient and starts showing progress report early.

 * "git commit" learned a new hook "prepare-commit-msg" that can
   inspect what is going to be committed and prepare the commit
   log message template to be edited.

 * "git cvsimport" can now take more than one -M options.

 * "git describe" learned to limit the tags to be used for
   naming with --match option.

 * "git describe --contains" now barfs when the named commit
   cannot be described.

 * "git describe --exact-match" describes only commits that are tagged.

 * "git describe --long" describes a tagged commit as $tag-0-$sha1,
   instead of just showing the exact tagname.

 * "git describe" warns when using a tag whose name and path contradict
   with each other.

 * "git diff" learned "--relative" option to limit and output paths
   relative to the current directory when working in a subdirectory.

 * "git diff" learned "--dirstat" option to show birds-eye-summary of
   changes more concisely than "--diffstat".

 * "git format-patch" learned --cover-letter option to generate a cover
   letter template.

 * "git gc" learned --quiet option.

 * "git gc" now automatically prunes unreachable objects that are two
   weeks old or older.

 * "git gc --auto" can be disabled more easily by just setting gc.auto
   to zero.  It also tolerates more packfiles by default.

 * "git grep" now knows "--name-only" is a synonym for the "-l" option.

 * "git help <alias>" now reports "'git <alias>' is alias to <what>",
   instead of saying "No manual entry for git-<alias>".

 * "git help" can use different backends to show manual pages and this can
   be configured using "man.viewer" configuration.

 * "gitk" does not restore window position from $HOME/.gitk anymore (it
   still restores the size).

 * "git log --grep=<what>" learned "--fixed-strings" option to look for
   <what> without treating it as a regular expression.

 * "git gui" learned an auto-spell checking.

 * "git push <somewhere> HEAD" and "git push <somewhere> +HEAD" works as
   expected; they push the current branch (and only the current branch).
   In addition, HEAD can be written as the value of "remote.<there>.push"
   configuration variable.

 * When the configuration variable "pack.threads" is set to 0, "git
   repack" auto detects the number of CPUs and uses that many threads.

 * "git send-email" learned to prompt for passwords
   interactively.

 * "git send-email" learned an easier way to suppress CC
   recipients.

 * "git stash" learned "pop" command, that applies the latest stash and
   removes it from the stash, and "drop" command to discard the named
   stash entry.

 * "git submodule" learned a new subcommand "summary" to show the
   symmetric difference between the HEAD version and the work tree version
   of the submodule commits.

 * Various "git cvsimport", "git cvsexportcommit", "git svn" and
   "git p4" improvements.

(internal)

 * Duplicated code between git-help and git-instaweb that
   launches user's preferred browser has been refactored.

 * It is now easier to write test scripts that records known
   breakages.

 * "git checkout" is rewritten in C.

 * "git remote" is rewritten in C.

 * Two conflict hunks that are separated by a very short span of common
   lines are now coalesced into one larger hunk, to make the result easier
   to read.

 * Run-command API's use of file descriptors is documented clearer and
   is more consistent now.

 * diff output can be sent to FILE * that is different from stdout.  This
   will help reimplementing more things in C.

Fixes since v1.5.4
------------------

All of the fixes in v1.5.4 maintenance series are included in
this release, unless otherwise noted.

 * "git-http-push" did not allow deletion of remote ref with the usual
   "push <remote> :<branch>" syntax.

 * "git-rebase --abort" did not go back to the right location if
   "git-reset" was run during the "git-rebase" session.

 * "git imap-send" without setting imap.host did not error out but
   segfaulted.

^ permalink raw reply	[flat|nested] 33+ messages in thread
* [PATCH 1/2] send-email: specify content-type of --compose body
@ 2008-03-25 23:02 Jeff King
  0 siblings, 0 replies; 33+ messages in thread
From: Jeff King @ 2008-03-25 23:02 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Teemu Likonen

If the compose message contains non-ascii characters, then
we assume it is in utf-8 and include the appropriate MIME
headers. If the user has already included a MIME-Version
header, then we assume they know what they are doing and
don't add any headers.

Signed-off-by: Jeff King <peff@peff.net>
---
 git-send-email.perl   |   24 ++++++++++++++++++++++++
 t/t9001-send-email.sh |   44 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 68 insertions(+), 0 deletions(-)

diff --git a/git-send-email.perl b/git-send-email.perl
index 9e568bf..7c4f06c 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -520,8 +520,22 @@ EOT
 	open(C,"<",$compose_filename)
 		or die "Failed to open $compose_filename : " . $!;
 
+	my $need_8bit_cte = file_has_nonascii($compose_filename);
+	my $in_body = 0;
 	while(<C>) {
 		next if m/^GIT: /;
+		if (!$in_body && /^\n$/) {
+			$in_body = 1;
+			if ($need_8bit_cte) {
+				print C2 "MIME-Version: 1.0\n",
+					 "Content-Type: text/plain; ",
+					   "charset=utf-8\n",
+					 "Content-Transfer-Encoding: 8bit\n";
+			}
+		}
+		if (!$in_body && /^MIME-Version:/i) {
+			$need_8bit_cte = 0;
+		}
 		print C2 $_;
 	}
 	close(C);
@@ -958,3 +972,13 @@ sub validate_patch {
 	}
 	return undef;
 }
+
+sub file_has_nonascii {
+	my $fn = shift;
+	open(my $fh, '<', $fn)
+		or die "unable to open $fn: $!\n";
+	while (my $line = <$fh>) {
+		return 1 if $line =~ /[^[:ascii:]]/;
+	}
+	return 0;
+}
diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
index c0973b4..e222c49 100755
--- a/t/t9001-send-email.sh
+++ b/t/t9001-send-email.sh
@@ -166,4 +166,48 @@ test_expect_success 'second message is patch' '
 	grep "Subject:.*Second" msgtxt2
 '
 
+test_expect_success '--compose adds MIME for utf8 body' '
+	clean_fake_sendmail &&
+	(echo "#!/bin/sh" &&
+	 echo "echo utf8 body: àéìöú >>\$1"
+	) >fake-editor-utf8 &&
+	chmod +x fake-editor-utf8 &&
+	echo y | \
+	  GIT_EDITOR=$(pwd)/fake-editor-utf8 \
+	  GIT_SEND_EMAIL_NOTTY=1 \
+	  git send-email \
+	  --compose --subject foo \
+	  --from="Example <nobody@example.com>" \
+	  --to=nobody@example.com \
+	  --smtp-server="$(pwd)/fake.sendmail" \
+	  $patches &&
+	grep "^utf8 body" msgtxt1 &&
+	grep "^Content-Type: text/plain; charset=utf-8" msgtxt1
+'
+
+test_expect_success '--compose respects user mime type' '
+	clean_fake_sendmail &&
+	(echo "#!/bin/sh" &&
+	 echo "(echo MIME-Version: 1.0"
+	 echo " echo Content-Type: text/plain\\; charset=iso-8859-1"
+	 echo " echo Content-Transfer-Encoding: 8bit"
+	 echo " echo Subject: foo"
+	 echo " echo "
+	 echo " echo utf8 body: àéìöú) >\$1"
+	) >fake-editor-utf8-mime &&
+	chmod +x fake-editor-utf8-mime &&
+	echo y | \
+	  GIT_EDITOR=$(pwd)/fake-editor-utf8-mime \
+	  GIT_SEND_EMAIL_NOTTY=1 \
+	  git send-email \
+	  --compose --subject foo \
+	  --from="Example <nobody@example.com>" \
+	  --to=nobody@example.com \
+	  --smtp-server="$(pwd)/fake.sendmail" \
+	  $patches &&
+	grep "^utf8 body" msgtxt1 &&
+	grep "^Content-Type: text/plain; charset=iso-8859-1" msgtxt1 &&
+	! grep "^Content-Type: text/plain; charset=utf-8" msgtxt1
+'
+
 test_done
-- 
1.5.5.rc1.123.ge5f4e6

^ permalink raw reply related	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2008-05-21 19:48 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-28  6:30 [ANNOUNCE] GIT 1.5.5-rc2 Junio C Hamano
2008-03-28 18:13 ` Jeff King
2008-03-28 21:05   ` Junio C Hamano
2008-03-28 21:23     ` Jeff King
2008-03-28 21:27       ` Jeff King
2008-03-28 21:28         ` [PATCH 1/2] send-email: specify content-type of --compose body Jeff King
2008-03-28 21:29         ` [PATCH 2/2] send-email: rfc2047-quote subject lines with non-ascii characters Jeff King
2008-03-29  7:19           ` Robin Rosenberg
2008-03-29  7:22             ` Jeff King
2008-03-29  8:41               ` Robin Rosenberg
2008-03-29  8:49                 ` Jeff King
2008-03-29  9:02                   ` Robin Rosenberg
2008-03-29  9:11                     ` Jeff King
2008-03-29  9:39                       ` Robin Rosenberg
2008-03-29  9:43                         ` Jeff King
2008-03-29 12:54                           ` Robin Rosenberg
2008-03-29 21:45                             ` Jeff King
2008-03-30  3:40                               ` Sam Vilain
2008-03-30  4:39                                 ` Jeff King
2008-03-30 23:47                 ` Junio C Hamano
2008-03-29  8:44               ` Robin Rosenberg
2008-03-29  8:53                 ` Jeff King
2008-03-29  9:38                   ` Robin Rosenberg
2008-03-29  9:52                     ` Jeff King
2008-03-29 12:54                       ` Robin Rosenberg
2008-03-29 21:18                         ` Jeff King
2008-03-29 21:43                           ` Robin Rosenberg
2008-03-29 22:00                             ` Jeff King
2008-03-30  2:12                       ` Sam Vilain
2008-03-30  4:31                         ` Jeff King
2008-05-21 19:39           ` Junio C Hamano
2008-05-21 19:47             ` Jeff King
  -- strict thread matches above, loose matches on Subject: below --
2008-03-25 23:02 [PATCH 1/2] send-email: specify content-type of --compose body Jeff King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).