]> source.dussan.org Git - jgit.git/commitdiff
Intermediate workaround for JGit's lack of core.autocrlf support 74/274/1
authorRobin Rosenberg <robin.rosenberg@dewire.com>
Thu, 4 Feb 2010 06:17:18 +0000 (07:17 +0100)
committerRobin Rosenberg <robin.rosenberg@dewire.com>
Thu, 4 Feb 2010 06:17:18 +0000 (07:17 +0100)
Windows users by default have core.autocrlf set to true. JGit
does not recognize the flags and thus works as if it is set. In order
to make JGit more compatible with msysgit we set the flag to false
in repositories that JGit creates.

Bug: 301775
Change-Id: I7ea462fe3516e5060b87aa1f7ed63689936830c2
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java

index 45eda052ad2525276ceb853023e1aa16000463ff..c00d81dcd1acb452a7369a7534116de039dcf2ee 100644 (file)
@@ -286,6 +286,7 @@ public class Repository {
                if (bare)
                        cfg.setBoolean("core", null, "bare", true);
                cfg.setBoolean("core", null, "logallrefupdates", !bare);
+               cfg.setBoolean("core", null, "autocrlf", false);
                cfg.save();
        }