git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wataru Noguchi <wnoguchi.0727@gmail.com>
To: git@vger.kernel.org
Cc: Wataru Noguchi <wnoguchi.0727@gmail.com>
Subject: [PATCH] git-compat-util.h: reduce optimization level to 1 on MinGW env.
Date: Thu, 26 Sep 2013 00:45:41 +0900	[thread overview]
Message-ID: <1380123941-25941-1-git-send-email-wnoguchi.0727@gmail.com> (raw)

Git for Windows crashes when clone Japanese multibyte repository.
- Japanese Base Encoding is Shift-JIS.
- It happens Japanese multibyte directory name and too-long directory path
- Linux(ex. Ubuntu 13.04 amd64) can clone normally.
- example repository is here:

git clone https://github.com/wnoguchi/mingw-checkout-crash.git

- The reproduce crash repository contains following file only.
  - following directory and file name is encoded for this commit log.
  - actually file name is decoded.]
  %E6%97%A5%E6%9C%AC%E8%AA%9E%E3%83%87%E3%82%A3%E3%83%AC%E3%82%AF%E3%83%88%E3%83%AA%201-long-long-long-dirname/%E6%97%A5%E6%9C%AC%E8%AA%9E%E3%83%87%E3%82%A3%E3%83%AC%E3%82%AF%E3%83%88%E3%83%AA%202-long-long-long-dirname/%E6%97%A5%E6%9C%AC%E8%AA%9E%E3%83%87%E3%82%A3%E3%83%AC%E3%82%AF%E3%83%88%E3%83%AA%203-long-long-long-dirname/%E6%97%A5%E6%9C%AC%E8%AA%9E%E3%83%87%E3%82%A3%E3%83%AC%E3%82%AF%E3%83%88%E3%83%AA%204-long-long-long-dirname/%E6%97%A5%E6%9C%AC%E8%AA%9E%E3%83%87%E3%82%A3%E3%83%AC%E3%82%AF%E3%83%88%E3%83%AA%205-long-long-long-dirname/%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB%E3%81%8A%E8%AA%AD%E3%81%BF%E3%81%8F%E3%81%A0%E3%81%95%E3%81%84.txt
- only one commit.

This commit reduce gcc optimization level from O2 to O1 when MinGW Windows environment.

Signed-off-by: Wataru Noguchi <wnoguchi.0727@gmail.com>
---
 git-compat-util.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/git-compat-util.h b/git-compat-util.h
index a31127f..394c23b 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -90,6 +90,8 @@
 #define WIN32_LEAN_AND_MEAN  /* stops windows.h including winsock.h */
 #include <winsock2.h>
 #include <windows.h>
+/* reduce gcc optimization level to 1 */
+#pragma GCC optimize ("O1")
 #define GIT_WINDOWS_NATIVE
 #endif
 
-- 
1.8.1.2

             reply	other threads:[~2013-09-25 15:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-25 15:45 Wataru Noguchi [this message]
2013-09-25 19:15 ` [PATCH] git-compat-util.h: reduce optimization level to 1 on MinGW env Jonathan Nieder
2013-09-25 19:50   ` Johannes Schindelin
2013-09-25 23:42     ` Wataru Noguchi
2013-09-26  0:47     ` Wataru Noguchi
2013-09-25 23:46   ` Wataru Noguchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1380123941-25941-1-git-send-email-wnoguchi.0727@gmail.com \
    --to=wnoguchi.0727@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).