git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[EGIT PATCH 07/10] GitIndex: Get access to raw name and file mode

From
Robin Rosenberg <robin.rosenberg@dewire.com>
Date
Feb 23, 2008, 23:50 UTC
Message-ID
<1203810643-28819-8-git-send-email-robin.rosenberg@dewire.com>
In-Reply-To
<1203810643-28819-7-git-send-email-robin.rosenberg@dewire.com>
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
Previous: Robin RosenbergNext: Robin Rosenberg
Message 8 of 12 in “[EGIT] Sort order from hell fixes, take 2”
  1. Robin RosenbergFeb 23, 2008
  2. 01/10 Tighten IndexDiffTest to make it test better what it claims to testRobin Rosenberg, Feb 23, 2008
  3. 02/10 Extend IndexDiffTest with more testsRobin Rosenberg, Feb 23, 2008
  4. 03/10 WorkdirCheckout: more test for names that are closeRobin Rosenberg, Feb 23, 2008
  5. 04/10 Split a big test in ReadTreeTest into smaller testsRobin Rosenberg, Feb 23, 2008
  6. 05/10 Fix git sort order compare bugRobin Rosenberg, Feb 23, 2008
  7. 06/10 Use the proper comparison algorithmRobin Rosenberg, Feb 23, 2008
  8. 07/10 GitIndex: Get access to raw name and file modeRobin Rosenberg, Feb 23, 2008
  9. 08/10 TreeEntry: Accessors for full raw name and mode bitsRobin Rosenberg, Feb 23, 2008
  10. 09/10 Implement a Tree iteratorRobin Rosenberg, Feb 23, 2008
  11. 10/10 Rewritten IndexTreeWalkerRobin Rosenberg, Feb 23, 2008
  12. David WatsonMar 3, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.