Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: [JGIT PATCH] Added forward slash to head/remote/tag prefix Constants

From: Shawn O. Pearce <hidden>
Date: 2016-06-15 22:45:12

Charles O'Farrell [off-list ref] wrote:
eg. Constants.HEADS_PREFIX + "/" ==> Constants.R_HEADS

This was always done by every instance anyway and so this will ensure
it isn't forgotten again.
Thanks, applied.  I had to hand-merge a few sections due to Marek's
push UI going in before your patch, but your patch not having the
necessary changes.  Using a different constant name helped make
that resolution less painful.
 
quoted hunk ↗ jump to hunk
--- a/org.spearce.jgit.pgm/src/org/spearce/jgit/pgm/TextBuiltin.java
+++ b/org.spearce.jgit.pgm/src/org/spearce/jgit/pgm/TextBuiltin.java
@@ -184,12 +181,12 @@ protected static String abbreviateObject(final ObjectId id) {
 	}
 
 	protected String abbreviateRef(String dst, boolean abbreviateRemote) {
-		if (dst.startsWith(REFS_HEADS))
-			dst = dst.substring(REFS_HEADS.length());
-		else if (dst.startsWith(REFS_TAGS))
-			dst = dst.substring(REFS_TAGS.length());
-		else if (abbreviateRemote && dst.startsWith(REFS_REMOTES))
-			dst = dst.substring(REFS_REMOTES.length());
+		if (dst.startsWith(R_HEADS))
+			dst = dst.substring(R_HEADS.length());
+		else if (dst.startsWith(R_TAGS))
+			dst = dst.substring(R_HEADS.length());
This should be R_TAGS. I fixed it when I applied the patch.

-- 
Shawn.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help