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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Charles O'Farrell <charleso@xxxxxxxxxxxx> 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.
 
> --- 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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux