threads / patch / 15128

patchTypo in implementation of pack protocol

Subject: [JGIT PATCH] Typo in implementation of pack protocol

## tl;dr

5 messages between Aug 21, 2008 and Aug 21, 2008. Diffs are folded; open one to read it.

replies: 4people: 3as markdown or json

Mike Ralphson· Aug 21, 2008, 10:36 UTC · lore

cgit's receive-pack.c has never had the corresponding typo. Fix up method and member names to match.

Signed-off-by: Mike Ralphson <mike@abacus.co.uk>
---
 .../spearce/jgit/transport/BasePackConnection.java |    2 +-
 .../jgit/transport/BasePackPushConnection.java     |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
Show changes to 2 files +4 −4

org.spearce.jgit/src/org/spearce/jgit/transport/BasePackConnection.java, org.spearce.jgit/src/org/spearce/jgit/transport/BasePackPushConnection.java

diff --git a/org.spearce.jgit/src/org/spearce/jgit/transport/BasePackConnection.java b/org.spearce.jgit/src/org/spearce/jgit/transport/BasePackConnection.java
index 52f3f48..14fffc3 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/transport/BasePackConnection.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/transport/BasePackConnection.java
@@ -144,7 +144,7 @@ for (String c : line.substring(nul + 1).split(" "))
 					line = line.substring(0, nul);
 				}
 
-				if (line.equals("capabilties^{}")) {
+				if (line.equals("capabilities^{}")) {
 					// special line from git-receive-pack to show
 					// capabilities when there are no refs to advertise
 					continue;
diff --git a/org.spearce.jgit/src/org/spearce/jgit/transport/BasePackPushConnection.java b/org.spearce.jgit/src/org/spearce/jgit/transport/BasePackPushConnection.java
index 6d95eaf..a2d5b6f 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/transport/BasePackPushConnection.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/transport/BasePackPushConnection.java
@@ -118,7 +118,7 @@ if (sentCommand && capableReport)
 
 	private void writeCommands(final Collection<RemoteRefUpdate> refUpdates,
 			final ProgressMonitor monitor) throws IOException {
-		final String capabilties = enableCapabilties();
+		final String capabilities = enableCapabilities();
 		for (final RemoteRefUpdate rru : refUpdates) {
 			if (!capableDeleteRefs && rru.isDelete()) {
 				rru.setStatus(Status.REJECTED_NODELETE);
@@ -136,7 +136,7 @@ if (!capableDeleteRefs && rru.isDelete()) {
 			sb.append(rru.getRemoteName());
 			if (!sentCommand) {
 				sentCommand = true;
-				sb.append(capabilties);
+				sb.append(capabilities);
 			}
 
 			pckOut.writeString(sb.toString());
@@ -151,7 +151,7 @@ if (monitor.isCancelled())
 		outNeedsEnd = false;
 	}
 
-	private String enableCapabilties() {
+	private String enableCapabilities() {
 		final StringBuilder line = new StringBuilder();
 		capableReport = wantCapability(line, CAPABILITY_REPORT_STATUS);
 		capableDeleteRefs = wantCapability(line, CAPABILITY_DELETE_REFS);
-- 
1.5.6.4
Shawn O. Pearce· Aug 21, 2008, 14:50 UTC · re: Mike Ralphson · lore

Re: [JGIT PATCH] Typo in implementation of pack protocol

Mike Ralphson <mike@abacus.co.uk> wrote:
> cgit's receive-pack.c has never had the corresponding typo.
> Fix up method and member names to match.
Whoops.  Thanks.
 
> -				if (line.equals("capabilties^{}")) {
> +				if (line.equals("capabilities^{}")) {
>  					// special line from git-receive-pack to show
>  					// capabilities when there are no refs to advertise
-- 
Shawn.
H.Merijn Brand· Aug 21, 2008, 15:00 UTC · re: Shawn O. Pearce · lore

Re: [JGIT PATCH] Typo in implementation of pack protocol

On Thu, 21 Aug 2008 07:50:12 -0700, "Shawn O. Pearce" <spearce@spearce.org> wrote:

Show 10 quoted lines
> Mike Ralphson <mike@abacus.co.uk> wrote:
> > cgit's receive-pack.c has never had the corresponding typo.
> > Fix up method and member names to match.
> 
> Whoops.  Thanks.
>  
> > -				if (line.equals("capabilties^{}")) {
> > +				if (line.equals("capabilities^{}")) {
> >  					// special line from git-receive-pack to show
> >  					// capabilities when there are no refs to advertise

Wouldn't it be nice to stick to ANSI Comments? I bet AIX xlc will fall over very very fast here

-- 
H.Merijn Brand          Amsterdam Perl Mongers  http://amsterdam.pm.org/
using & porting perl 5.6.2, 5.8.x, 5.10.x, 5.11.x on HP-UX 10.20, 11.00,
11.11, 11.23, and 11.31, SuSE 10.1, 10.2, and 10.3, AIX 5.2, and Cygwin.
http://mirrors.develooper.com/hpux/           http://www.test-smoke.org/
http://qa.perl.org      http://www.goldmark.org/jeff/stupid-disclaimers/
H.Merijn Brand· Aug 21, 2008, 15:02 UTC · re: H.Merijn Brand · lore

Re: [JGIT PATCH] Typo in implementation of pack protocol

On Thu, 21 Aug 2008 17:00:42 +0200, "H.Merijn Brand" <h.m.brand@xs4all.nl> wrote:

Show 16 quoted lines
> On Thu, 21 Aug 2008 07:50:12 -0700, "Shawn O. Pearce"
> <spearce@spearce.org> wrote:
> 
> > Mike Ralphson <mike@abacus.co.uk> wrote:
> > > cgit's receive-pack.c has never had the corresponding typo.
> > > Fix up method and member names to match.
> > 
> > Whoops.  Thanks.
> >  
> > > -				if (line.equals("capabilties^{}")) {
> > > +				if (line.equals("capabilities^{}")) {
> > >  					// special line from git-receive-pack to show
> > >  					// capabilities when there are no refs to advertise
> 
> Wouldn't it be nice to stick to ANSI Comments?
> I bet AIX xlc will fall over very very fast here
Ignore that stupid remark. It's java :(
-- 
H.Merijn Brand          Amsterdam Perl Mongers  http://amsterdam.pm.org/
using & porting perl 5.6.2, 5.8.x, 5.10.x, 5.11.x on HP-UX 10.20, 11.00,
11.11, 11.23, and 11.31, SuSE 10.1, 10.2, and 10.3, AIX 5.2, and Cygwin.
http://mirrors.develooper.com/hpux/           http://www.test-smoke.org/
http://qa.perl.org      http://www.goldmark.org/jeff/stupid-disclaimers/
Shawn O. Pearce· Aug 21, 2008, 15:02 UTC · re: H.Merijn Brand · lore

Re: [JGIT PATCH] Typo in implementation of pack protocol

"H.Merijn Brand" <h.m.brand@xs4all.nl> wrote:
Show 16 quoted lines
> On Thu, 21 Aug 2008 07:50:12 -0700, "Shawn O. Pearce"
> <spearce@spearce.org> wrote:
> 
> > Mike Ralphson <mike@abacus.co.uk> wrote:
> > > cgit's receive-pack.c has never had the corresponding typo.
> > > Fix up method and member names to match.
> > 
> > Whoops.  Thanks.
> >  
> > > -				if (line.equals("capabilties^{}")) {
> > > +				if (line.equals("capabilities^{}")) {
> > >  					// special line from git-receive-pack to show
> > >  					// capabilities when there are no refs to advertise
> 
> Wouldn't it be nice to stick to ANSI Comments?
> I bet AIX xlc will fall over very very fast here
AIX xlc compiles Java code?
This is JGIT, written in Java, not git.git, written in ANSI C...
-- 
Shawn.

← back to recent threads