diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java index ddace0df2ed12f7a4391d764ff359123354ff89a..001deb262b16c220e5d806f760342fc822c7b040 100644 --- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java +++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java @@ -286,7 +286,7 @@ protected Repository createWorkRepository() throws IOException { */ private Repository createRepository(boolean bare) throws IOException { String uniqueId = System.currentTimeMillis() + "_" + (testCount++); - String gitdirName = "test" + uniqueId + (bare ? "" : "/") + ".git"; + String gitdirName = "test" + uniqueId + (bare ? "" : "/") + Constants.DOT_GIT; File gitdir = new File(trash, gitdirName).getCanonicalFile(); Repository db = new Repository(gitdir); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clone.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clone.java index 3fe50d668242c56e9f055208894e119de33d4e43..10bb357e268dce33d27523d9e0591a0323d805ba 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clone.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clone.java @@ -100,7 +100,7 @@ protected void run() throws Exception { } } if (gitdir == null) - gitdir = new File(localName, ".git"); + gitdir = new File(localName, Constants.DOT_GIT); db = new Repository(gitdir); db.create(); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Glog.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Glog.java index c799222f56a8ad4bb523a5dd5921fe2543eec22f..caf4f30e3b5a51a7957413d696530de26dd49a37 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Glog.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Glog.java @@ -1,4 +1,5 @@ /* + * Copyright (C) 2010, Robin Rosenberg <robin.rosenberg@dewire.com> * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org> * and other copyright owners as documented in the project's IP log. * @@ -57,6 +58,7 @@ import javax.swing.JScrollPane; import org.eclipse.jgit.awtui.CommitGraphPane; +import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.revplot.PlotWalk; import org.eclipse.jgit.revwalk.RevCommit; import org.eclipse.jgit.revwalk.RevSort; @@ -125,7 +127,7 @@ protected RevWalk createWalk() { private String repoName() { final File f = db.getDirectory(); String n = f.getName(); - if (".git".equals(n)) + if (Constants.DOT_GIT.equals(n)) n = f.getParentFile().getName(); return n; } diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Init.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Init.java index b6a4a44a9e6d0ec1cf44324c19fa275f816dde57..a8fe7d8a536f3bf7b21b3a87d60ab4e20edda56d 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Init.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Init.java @@ -1,6 +1,7 @@ /* * Copyright (C) 2009, Constantine Plotnikov <constantine.plotnikov@gmail.com> * Copyright (C) 2008, Google Inc. + * Copyright (C) 2010, Robin Rosenberg <robin.rosenberg@dewire.com> * and other copyright owners as documented in the project's IP log. * * This program and the accompanying materials are made available @@ -47,6 +48,7 @@ import java.io.File; import org.kohsuke.args4j.Option; +import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.lib.Repository; @Command(common = true, usage = "Create an empty git repository") @@ -62,7 +64,7 @@ protected final boolean requiresRepository() { @Override protected void run() throws Exception { if (gitdir == null) - gitdir = new File(bare ? "." : ".git"); + gitdir = new File(bare ? "." : Constants.DOT_GIT); db = new Repository(gitdir); db.create(bare); out.println("Initialized empty Git repository in " diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java index b4c5660a6d20b361f793e86bc9a3251a7a7b258b..10ebef4637ae539a1ae39ce5b6aa2e011f866a7d 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java @@ -228,7 +228,7 @@ private static File findGitDir() { } File current = new File("").getAbsoluteFile(); while (current != null) { - final File gitDir = new File(current, ".git"); + final File gitDir = new File(current, Constants.DOT_GIT); if (gitDir.isDirectory()) return gitDir; current = current.getParentFile(); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ReceivePack.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ReceivePack.java index c6a6fd0cbf795df7d89ee8bff7670a1bd83d2001..f43a2793ee813254a84503a3dd6e6591986d714e 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ReceivePack.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ReceivePack.java @@ -1,6 +1,6 @@ /* * Copyright (C) 2008-2009, Google Inc. - * Copyright (C) 2009, Robin Rosenberg <robin.rosenberg@dewire.com> + * Copyright (C) 2009-2010, Robin Rosenberg <robin.rosenberg@dewire.com> * and other copyright owners as documented in the project's IP log. * * This program and the accompanying materials are made available @@ -47,6 +47,7 @@ import java.io.File; import org.kohsuke.args4j.Argument; +import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.lib.Repository; @Command(common = false, usage = "Server side backend for 'jgit push'") @@ -63,8 +64,8 @@ protected final boolean requiresRepository() { protected void run() throws Exception { final org.eclipse.jgit.transport.ReceivePack rp; - if (new File(dstGitdir, ".git").isDirectory()) - dstGitdir = new File(dstGitdir, ".git"); + if (new File(dstGitdir, Constants.DOT_GIT).isDirectory()) + dstGitdir = new File(dstGitdir, Constants.DOT_GIT); db = new Repository(dstGitdir); if (!db.getObjectsDirectory().isDirectory()) throw die("'" + dstGitdir.getPath() + "' not a git repository"); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/UploadPack.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/UploadPack.java index 85dbbc5d9cb3200972258bc3389427a97d593af2..ea30899dcb6180cd91acbb403d266abd3567c161 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/UploadPack.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/UploadPack.java @@ -1,6 +1,6 @@ /* * Copyright (C) 2008-2009, Google Inc. - * Copyright (C) 2009, Robin Rosenberg <robin.rosenberg@dewire.com> + * Copyright (C) 2009-2010, Robin Rosenberg <robin.rosenberg@dewire.com> * and other copyright owners as documented in the project's IP log. * * This program and the accompanying materials are made available @@ -48,6 +48,7 @@ import org.kohsuke.args4j.Argument; import org.kohsuke.args4j.Option; +import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.lib.Repository; @Command(common = false, usage = "Server side backend for 'jgit fetch'") @@ -67,8 +68,8 @@ protected final boolean requiresRepository() { protected void run() throws Exception { final org.eclipse.jgit.transport.UploadPack rp; - if (new File(srcGitdir, ".git").isDirectory()) - srcGitdir = new File(srcGitdir, ".git"); + if (new File(srcGitdir, Constants.DOT_GIT).isDirectory()) + srcGitdir = new File(srcGitdir, Constants.DOT_GIT); db = new Repository(srcGitdir); if (!db.getObjectsDirectory().isDirectory()) throw die("'" + srcGitdir.getPath() + "' not a git repository"); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/T0003_Basic.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/T0003_Basic.java index e29e9e7214b4ed9a3152e6405c230ec39c108901..e0cc345103314fcabd81c4bc184b7e8047255421 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/T0003_Basic.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/T0003_Basic.java @@ -1,6 +1,6 @@ /* * Copyright (C) 2007, Dave Watson <dwatson@mimvista.com> - * Copyright (C) 2007-2009, Robin Rosenberg <robin.rosenberg@dewire.com> + * Copyright (C) 2007-2010, Robin Rosenberg <robin.rosenberg@dewire.com> * Copyright (C) 2006-2008, Shawn O. Pearce <spearce@spearce.org> * and other copyright owners as documented in the project's IP log. * @@ -57,7 +57,7 @@ public class T0003_Basic extends SampleDataRepositoryTestCase { public void test001_Initalize() { - final File gitdir = new File(trash, ".git"); + final File gitdir = new File(trash, Constants.DOT_GIT); final File objects = new File(gitdir, "objects"); final File objects_pack = new File(objects, "pack"); final File objects_info = new File(objects, "info"); @@ -97,11 +97,11 @@ public void test000_openRepoBadArgs() throws IOException { */ public void test000_openrepo_default_gitDirSet() throws IOException { File repo1Parent = new File(trash.getParentFile(), "r1"); - Repository repo1initial = new Repository(new File(repo1Parent, ".git")); + Repository repo1initial = new Repository(new File(repo1Parent, Constants.DOT_GIT)); repo1initial.create(); repo1initial.close(); - File theDir = new File(repo1Parent, ".git"); + File theDir = new File(repo1Parent, Constants.DOT_GIT); Repository r = new Repository(theDir, null); assertEqualsPath(theDir, r.getDirectory()); assertEqualsPath(repo1Parent, r.getWorkDir()); @@ -117,11 +117,11 @@ public void test000_openrepo_default_gitDirSet() throws IOException { */ public void test000_openrepo_default_gitDirAndWorkTreeSet() throws IOException { File repo1Parent = new File(trash.getParentFile(), "r1"); - Repository repo1initial = new Repository(new File(repo1Parent, ".git")); + Repository repo1initial = new Repository(new File(repo1Parent, Constants.DOT_GIT)); repo1initial.create(); repo1initial.close(); - File theDir = new File(repo1Parent, ".git"); + File theDir = new File(repo1Parent, Constants.DOT_GIT); Repository r = new Repository(theDir, repo1Parent.getParentFile()); assertEqualsPath(theDir, r.getDirectory()); assertEqualsPath(repo1Parent.getParentFile(), r.getWorkDir()); @@ -137,11 +137,11 @@ public void test000_openrepo_default_gitDirAndWorkTreeSet() throws IOException { */ public void test000_openrepo_default_workDirSet() throws IOException { File repo1Parent = new File(trash.getParentFile(), "r1"); - Repository repo1initial = new Repository(new File(repo1Parent, ".git")); + Repository repo1initial = new Repository(new File(repo1Parent, Constants.DOT_GIT)); repo1initial.create(); repo1initial.close(); - File theDir = new File(repo1Parent, ".git"); + File theDir = new File(repo1Parent, Constants.DOT_GIT); Repository r = new Repository(null, repo1Parent); assertEqualsPath(theDir, r.getDirectory()); assertEqualsPath(repo1Parent, r.getWorkDir()); @@ -159,14 +159,14 @@ public void test000_openrepo_default_absolute_workdirconfig() File repo1Parent = new File(trash.getParentFile(), "r1"); File workdir = new File(trash.getParentFile(), "rw"); workdir.mkdir(); - Repository repo1initial = new Repository(new File(repo1Parent, ".git")); + Repository repo1initial = new Repository(new File(repo1Parent, Constants.DOT_GIT)); repo1initial.create(); repo1initial.getConfig().setString("core", null, "worktree", workdir.getAbsolutePath()); repo1initial.getConfig().save(); repo1initial.close(); - File theDir = new File(repo1Parent, ".git"); + File theDir = new File(repo1Parent, Constants.DOT_GIT); Repository r = new Repository(theDir, null); assertEqualsPath(theDir, r.getDirectory()); assertEqualsPath(workdir, r.getWorkDir()); @@ -184,14 +184,14 @@ public void test000_openrepo_default_relative_workdirconfig() File repo1Parent = new File(trash.getParentFile(), "r1"); File workdir = new File(trash.getParentFile(), "rw"); workdir.mkdir(); - Repository repo1initial = new Repository(new File(repo1Parent, ".git")); + Repository repo1initial = new Repository(new File(repo1Parent, Constants.DOT_GIT)); repo1initial.create(); repo1initial.getConfig() .setString("core", null, "worktree", "../../rw"); repo1initial.getConfig().save(); repo1initial.close(); - File theDir = new File(repo1Parent, ".git"); + File theDir = new File(repo1Parent, Constants.DOT_GIT); Repository r = new Repository(theDir, null); assertEqualsPath(theDir, r.getDirectory()); assertEqualsPath(workdir, r.getWorkDir()); @@ -211,11 +211,11 @@ public void test000_openrepo_alternate_index_file_and_objdirs() File indexFile = new File(trash, "idx"); File objDir = new File(trash, "../obj"); File[] altObjDirs = new File[] { db.getObjectsDirectory() }; - Repository repo1initial = new Repository(new File(repo1Parent, ".git")); + Repository repo1initial = new Repository(new File(repo1Parent, Constants.DOT_GIT)); repo1initial.create(); repo1initial.close(); - File theDir = new File(repo1Parent, ".git"); + File theDir = new File(repo1Parent, Constants.DOT_GIT); Repository r = new Repository(theDir, null, objDir, altObjDirs, indexFile); assertEqualsPath(theDir, r.getDirectory()); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Constants.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Constants.java index 05de98c1aa3396a885382b12cda8fe16e8aa59b3..348905dd12cafbd57bd0188119984dbb717e8092 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Constants.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Constants.java @@ -308,6 +308,12 @@ public final class Constants { /** Default remote name used by clone, push and fetch operations */ public static final String DEFAULT_REMOTE_NAME = "origin"; + /** Default name for the Git repository directory */ + public static final String DOT_GIT = ".git"; + + /** A bare repository typically ends with this string */ + public static final String DOT_GIT_EXT = ".git"; + /** * Create a new digest function for objects. * diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java index bbc5cc2a6afd07a9ec26c16152e833b5f5bd51cc..91a97740e54873a6d34125004d4c5da6ec53a15f 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java @@ -1,6 +1,6 @@ /* * Copyright (C) 2007, Dave Watson <dwatson@mimvista.com> - * Copyright (C) 2006-2009, Robin Rosenberg <robin.rosenberg@dewire.com> + * Copyright (C) 2006-2010, Robin Rosenberg <robin.rosenberg@dewire.com> * Copyright (C) 2006-2008, Shawn O. Pearce <spearce@spearce.org> * and other copyright owners as documented in the project's IP log. * @@ -183,7 +183,7 @@ public Repository(final File d, final File workTree, final File objectDir, if (workTree != null) { workDir = workTree; if (d == null) - gitDir = new File(workTree, ".git"); + gitDir = new File(workTree, Constants.DOT_GIT); else gitDir = d; } else { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryCache.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryCache.java index f0fc544de9db17112ee62506a996016d33749d68..b086968c6ce2497d0ffb9d1361d68674f8ad1f24 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryCache.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryCache.java @@ -377,13 +377,13 @@ private static String readFirstLine(final File head) { public static File resolve(final File directory) { if (isGitRepository(directory)) return directory; - if (isGitRepository(new File(directory, ".git"))) - return new File(directory, ".git"); + if (isGitRepository(new File(directory, Constants.DOT_GIT))) + return new File(directory, Constants.DOT_GIT); final String name = directory.getName(); final File parent = directory.getParentFile(); - if (isGitRepository(new File(parent, name + ".git"))) - return new File(parent, name + ".git"); + if (isGitRepository(new File(parent, name + Constants.DOT_GIT_EXT))) + return new File(parent, name + Constants.DOT_GIT_EXT); return null; } } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/Daemon.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/Daemon.java index c6f69043be7bfab9337abb138d6975e066270570..cafcd7b4bdcb8f9e123c8e02c82ace9fe0f1170f 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/Daemon.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/Daemon.java @@ -57,6 +57,7 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.CopyOnWriteArrayList; +import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.lib.PersonIdent; import org.eclipse.jgit.lib.Repository; import org.eclipse.jgit.lib.RepositoryCache; @@ -204,8 +205,8 @@ public void setExportAll(final boolean export) { * the repository instance. */ public void exportRepository(String name, final Repository db) { - if (!name.endsWith(".git")) - name = name + ".git"; + if (!name.endsWith(Constants.DOT_GIT_EXT)) + name = name + Constants.DOT_GIT_EXT; exports.put(name, db); RepositoryCache.register(db); } @@ -358,7 +359,8 @@ Repository openRepository(String name) { name = name.substring(1); Repository db; - db = exports.get(name.endsWith(".git") ? name : name + ".git"); + db = exports.get(name.endsWith(Constants.DOT_GIT_EXT) ? name : name + + Constants.DOT_GIT_EXT); if (db != null) { db.incrementOpen(); return db; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportLocal.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportLocal.java index 8bb22275b53390d69a2153b1509907d1805565d8..a99a9b41311edbede1eb67fb4f74c29a1cb7ab63 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportLocal.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportLocal.java @@ -56,6 +56,7 @@ import org.eclipse.jgit.errors.NotSupportedException; import org.eclipse.jgit.errors.TransportException; +import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.lib.Repository; import org.eclipse.jgit.util.FS; @@ -101,8 +102,8 @@ static boolean canHandle(final URIish uri) { super(local, uri); File d = FS.resolve(new File(PWD), uri.getPath()).getAbsoluteFile(); - if (new File(d, ".git").isDirectory()) - d = new File(d, ".git"); + if (new File(d, Constants.DOT_GIT).isDirectory()) + d = new File(d, Constants.DOT_GIT); remoteGitDir = d; } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/URIish.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/URIish.java index 1f7bad18386fa25406bf662eea1cfe0f60095bc7..80b94b23249acab4cc852f943dbf33de642a5bf8 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/URIish.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/URIish.java @@ -50,6 +50,8 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; +import org.eclipse.jgit.lib.Constants; + /** * This URI like construct used for referencing Git archives over the net, as * well as locally stored archives. The most important difference compared to @@ -57,8 +59,6 @@ * any special character is written as-is. */ public class URIish { - private static final String DOT_GIT = ".git"; - private static final Pattern FULL_URI = Pattern .compile("^(?:([a-z][a-z0-9+-]+)://(?:([^/]+?)(?::([^/]+?))?@)?(?:([^/]+?))?(?::(\\d+))?)?((?:[A-Za-z]:)?/.+)$"); @@ -408,10 +408,11 @@ public String getHumanishName() throws IllegalArgumentException { if (elements.length == 0) throw new IllegalArgumentException(); String result = elements[elements.length - 1]; - if (DOT_GIT.equals(result)) + if (Constants.DOT_GIT.equals(result)) result = elements[elements.length - 2]; - else if (result.endsWith(DOT_GIT)) - result = result.substring(0, result.length() - DOT_GIT.length()); + else if (result.endsWith(Constants.DOT_GIT_EXT)) + result = result.substring(0, result.length() + - Constants.DOT_GIT_EXT.length()); return result; } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/FileTreeIterator.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/FileTreeIterator.java index 10bb539a292d29c98a849b3dc73feba6d427c434..19db39a8fff1879ba3e14a78ef92be9a6bc1b9cb 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/FileTreeIterator.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/FileTreeIterator.java @@ -1,6 +1,6 @@ /* * Copyright (C) 2008, Google Inc. - * Copyright (C) 2007, Robin Rosenberg <robin.rosenberg@dewire.com> + * Copyright (C) 2007-2010, Robin Rosenberg <robin.rosenberg@dewire.com> * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org> * Copyright (C) 2009, Tor Arne Vestbø <torarnv@gmail.com> * and other copyright owners as documented in the project's IP log. @@ -52,6 +52,7 @@ import java.io.InputStream; import org.eclipse.jgit.errors.IncorrectObjectTypeException; +import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.lib.FileMode; import org.eclipse.jgit.lib.Repository; import org.eclipse.jgit.util.FS; @@ -124,7 +125,7 @@ static public class FileEntry extends Entry { file = f; if (f.isDirectory()) { - if (new File(f, ".git").isDirectory()) + if (new File(f, Constants.DOT_GIT).isDirectory()) mode = FileMode.GITLINK; else mode = FileMode.TREE; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java index 0c6786bcd36a36510e2b39f64e89dd57dd9f348e..6b8a6cea4b5bc06ab15420b60fd4c2e80fe866e6 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java @@ -336,7 +336,7 @@ protected void init(final Entry[] list) { final String name = e.getName(); if (".".equals(name) || "..".equals(name)) continue; - if (".git".equals(name)) + if (Constants.DOT_GIT.equals(name)) continue; if (i != o) entries[o] = e;