]> source.dussan.org Git - jgit.git/commitdiff
Remove pointless boolean during native push 86/286/1
authorShawn O. Pearce <spearce@spearce.org>
Tue, 9 Feb 2010 23:58:37 +0000 (15:58 -0800)
committerShawn O. Pearce <spearce@spearce.org>
Wed, 10 Feb 2010 03:51:36 +0000 (19:51 -0800)
The boolean field sentCommand is always true at this point, as it
was assigned just 5 lines above.  So we always set the status of
the update command object to AWAITING_REPORT.

Simplify the logic by dropping the ?: operator.  I assume this is
older code from an attempt to manage dry-run push support within
the native connection, but in fact dry-run support is done higher
up inside of PushProcess.

Change-Id: I450d491bbbb5afecdbf5444ab7169222e856a3bb
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackPushConnection.java

index b1ce28d35f4c860733b05b0ae9d8c56cd0bba3c6..2603ca2879411f549a5cadc14bba47d39eb24495 100644 (file)
@@ -178,7 +178,7 @@ class BasePackPushConnection extends BasePackConnection implements
                        }
 
                        pckOut.writeString(sb.toString());
-                       rru.setStatus(sentCommand ? Status.AWAITING_REPORT : Status.OK);
+                       rru.setStatus(Status.AWAITING_REPORT);
                        if (!rru.isDelete())
                                writePack = true;
                }