From 0a824f59969721eafd45494cf7dade1ed4d0c4e8 Mon Sep 17 00:00:00 2001 From: Robin Rosenberg Date: Sat, 30 Mar 2013 00:03:08 +0100 Subject: [PATCH] Add a constant for info/exclude Change-Id: Ifd537ce4e726cb9460ea332f683428689bd3d7f4 --- org.eclipse.jgit/src/org/eclipse/jgit/lib/Constants.java | 3 +++ .../src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) 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 907742ee8..1e8d0d808 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Constants.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Constants.java @@ -265,6 +265,9 @@ public final class Constants { /** Packed refs file */ public static final String PACKED_REFS = "packed-refs"; + /** Excludes-file */ + public static final String INFO_EXCLUDE = "info/exclude"; + /** The environment variable that contains the system user name */ public static final String OS_USER_NAME_KEY = "user.name"; 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 9a7db888c..07ba9d73a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java @@ -1074,8 +1074,8 @@ public abstract class WorkingTreeIterator extends AbstractTreeIterator { loadRulesFromFile(r, excludesfile); } - File exclude = fs - .resolve(repository.getDirectory(), "info/exclude"); //$NON-NLS-1$ + File exclude = fs.resolve(repository.getDirectory(), + Constants.INFO_EXCLUDE); loadRulesFromFile(r, exclude); return r.getRules().isEmpty() ? null : r;