{"thread":{"id":"18678","subject":"[JGIT PATCH/RFC] Added -crlf attribute for test patch files","startedAt":"2009-04-01T10:59:50Z","lastAt":"2009-04-01T10:59:50Z","messageCount":1,"participants":["Constantine Plotnikov"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"110120","messageId":"85647ef50904010359r639f5278t23c85d7c91a59d6b@mail.gmail.com","threadId":"18678","inReplyTo":null,"subject":"[JGIT PATCH/RFC] Added -crlf attribute for test patch files","fromName":"Constantine Plotnikov","fromEmail":"constantine.plotnikov@gmail.com","sentAt":"2009-04-01T10:59:50Z","receivedAt":"2009-04-01T10:59:50Z","isPatch":true,"sender":{"key":"constantine.plotnikov@gmail.com","avatar":null},"body":"The method RawParseUtils.nextLF(byte[],int,char) used for parsing\npatches expects \\n as a line separator. However on MinGW git\nuses \\r\\n as line separator for text files by default, and patch\nfiles in egit/org.spearce.jgit.test/tst-rsrc/org/spearce/jgit/patch\nare treated as text files. This caused test suit failure. To prevent\ntest suit failure, \"-crlf\" attribute is added for patch files.\n\nSigned-off-by: Constantine Plotnikov <constantine.plotnikov@gmail.com>\n---\nI'm not completely sure whether I have fixed a correct place.\nMinGW itself uses \\n as line separator in patches. Thus I think\nit is an error to have \\r\\n in the patch file, so I have fixed\npatch files rather than parsing code. Other possible solution\nis to fix nextLF() to handle \\r\\n as well.\n\nWithout this fix the egit could not be built on the maven when\nit is checked out using MinGW git.\n\n .../tst-rsrc/org/spearce/jgit/patch/.gitattributes |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n create mode 100644\norg.spearce.jgit.test/tst-rsrc/org/spearce/jgit/patch/.gitattributes\n\ndiff --git a/org.spearce.jgit.test/tst-rsrc/org/spearce/jgit/patch/.gitattributes\nb/org.spearce.jgit.test/tst-rsrc/org/spearce/jgit/patch/.gitattributes\nnew file mode 100644\nindex 0000000..b38f87f\n--- /dev/null\n+++ b/org.spearce.jgit.test/tst-rsrc/org/spearce/jgit/patch/.gitattributes\n@@ -0,0 +1 @@\n+*.patch -crlf\n-- \n1.6.0.2.1172.ga5ed0\n"}]}