[EGIT PATCH 07/10] GitIndex: Get access to raw name and file mode
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
---
.../src/org/spearce/jgit/lib/GitIndex.java | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/GitIndex.java b/org.spearce.jgit/src/org/spearce/jgit/lib/GitIndex.java
index 69ed270..d73866a 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/lib/GitIndex.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/lib/GitIndex.java
@@ -598,6 +598,13 @@ public class GitIndex {
}
/**
+ * @return path name for this entry as byte array, hopefully UTF-8 encoded
+ */
+ public byte[] getNameUTF8() {
+ return name;
+ }
+
+ /**
* @return SHA-1 of the entry managed by this index
*/
public ObjectId getObjectId() {
@@ -655,6 +662,14 @@ public class GitIndex {
else
flags &= ~0x4000;
}
+
+ /**
+ * Return raw file mode bits. See {@link FileMode}
+ * @return file mode bits
+ */
+ public int getModeBits() {
+ return mode;
+ }
}
static class Header {
--
1.5.4.2