From: Constantine Plotnikov <constantine.plotnikov@gmail.com>
To: git@vger.kernel.org
Subject: [JGIT PATCH/RFC] Added -crlf attribute for test patch files
Date: Wed, 1 Apr 2009 13:59:50 +0300 [thread overview]
Message-ID: <85647ef50904010359r639f5278t23c85d7c91a59d6b@mail.gmail.com> (raw)
The method RawParseUtils.nextLF(byte[],int,char) used for parsing
patches expects \n as a line separator. However on MinGW git
uses \r\n as line separator for text files by default, and patch
files in egit/org.spearce.jgit.test/tst-rsrc/org/spearce/jgit/patch
are treated as text files. This caused test suit failure. To prevent
test suit failure, "-crlf" attribute is added for patch files.
Signed-off-by: Constantine Plotnikov <constantine.plotnikov@gmail.com>
---
I'm not completely sure whether I have fixed a correct place.
MinGW itself uses \n as line separator in patches. Thus I think
it is an error to have \r\n in the patch file, so I have fixed
patch files rather than parsing code. Other possible solution
is to fix nextLF() to handle \r\n as well.
Without this fix the egit could not be built on the maven when
it is checked out using MinGW git.
.../tst-rsrc/org/spearce/jgit/patch/.gitattributes | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644
org.spearce.jgit.test/tst-rsrc/org/spearce/jgit/patch/.gitattributes
diff --git a/org.spearce.jgit.test/tst-rsrc/org/spearce/jgit/patch/.gitattributes
b/org.spearce.jgit.test/tst-rsrc/org/spearce/jgit/patch/.gitattributes
new file mode 100644
index 0000000..b38f87f
--- /dev/null
+++ b/org.spearce.jgit.test/tst-rsrc/org/spearce/jgit/patch/.gitattributes
@@ -0,0 +1 @@
+*.patch -crlf
--
1.6.0.2.1172.ga5ed0
reply other threads:[~2009-04-01 11:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=85647ef50904010359r639f5278t23c85d7c91a59d6b@mail.gmail.com \
--to=constantine.plotnikov@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).