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

[EGIT PATCH 3/3] Present full name of file revision

From
Robin Rosenberg <robin.rosenberg@dewire.com>
Date
Jan 10, 2009, 01:14 UTC
Message-ID
<1231550077-1057-4-git-send-email-robin.rosenberg@dewire.com>
In-Reply-To
<1231550077-1057-3-git-send-email-robin.rosenberg@dewire.com>
The name need not be a path.
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
---
 .../core/internal/storage/GitFileRevision.java     |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/org.spearce.egit.core/src/org/spearce/egit/core/internal/storage/GitFileRevision.java b/org.spearce.egit.core/src/org/spearce/egit/core/internal/storage/GitFileRevision.java
index 21ba19e..c762e2e 100644
--- a/org.spearce.egit.core/src/org/spearce/egit/core/internal/storage/GitFileRevision.java
+++ b/org.spearce.egit.core/src/org/spearce/egit/core/internal/storage/GitFileRevision.java
@@ -32,7 +32,7 @@
 
 	/**
 	 * Obtain a file revision for a specific blob of an existing commit.
-	 * 
+	 *
 	 * @param db
 	 *            the repository this commit was loaded out of, and that this
 	 *            file's blob should also be reachable through.
@@ -56,8 +56,7 @@ GitFileRevision(final String fileName) {
 	}
 
 	public String getName() {
-		final int last = path.lastIndexOf('/');
-		return last >= 0 ? path.substring(last + 1) : path;
+		return path;
 	}
 
 	public boolean isPropertyMissing() {
-- 
1.6.1.rc3.56.gd0306
Previous: Robin RosenbergNext: Robin Rosenberg
Message 4 of 6 in “Show all changes files in the same compare editor”
  1. 0/3 Show all changes files in the same compare editorRobin Rosenberg, Jan 10, 2009
  2. 1/3 Support viewing all changes in a single compare editorRobin Rosenberg, Jan 10, 2009
  3. 2/3 Present type of change with file revision in diff viewerRobin Rosenberg, Jan 10, 2009
  4. 3/3 Present full name of file revisionRobin Rosenberg, Jan 10, 2009
  5. Robin RosenbergJan 10, 2009
  6. Shawn O. PearceJan 12, 2009

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.