From efdcb16be3d34e97bb05d9ddaea538ba2d906eca Mon Sep 17 00:00:00 2001
From: "Shawn O. Pearce" <spearce@spearce.org>
Date: Tue, 9 Feb 2010 15:58:37 -0800
Subject: [PATCH] Remove pointless boolean during native push

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>
---
 .../src/org/eclipse/jgit/transport/BasePackPushConnection.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackPushConnection.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackPushConnection.java
index b1ce28d35..2603ca287 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackPushConnection.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackPushConnection.java
@@ -178,7 +178,7 @@ private void writeCommands(final Collection<RemoteRefUpdate> refUpdates,
 			}
 
 			pckOut.writeString(sb.toString());
-			rru.setStatus(sentCommand ? Status.AWAITING_REPORT : Status.OK);
+			rru.setStatus(Status.AWAITING_REPORT);
 			if (!rru.isDelete())
 				writePack = true;
 		}
-- 
GitLab