From 47f47ffc07e00109dc069e111274252e4053a599 Mon Sep 17 00:00:00 2001 From: Roberto Tyley Date: Wed, 29 Jan 2014 00:01:53 +0000 Subject: Initialise ReceiveCommand status to NOT_ATTEMPTED for all constructors Formerly the 4-arg constructor did not do this, which was unfortunate as that constructor's the only way for an external user of JGit to set the /type/ of the ref-update - which you might want to do to indicate that the update is expected to be a UPDATE_NONFASTFORWARD, and thus does not require expensive isMergedInto() calculations: http://dev.eclipse.org/mhonarc/lists/jgit-dev/msg02258.html Change-Id: I84c5e4927131e105bed93e31a62da6367c78de32 Signed-off-by: Roberto Tyley --- org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceiveCommand.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'org.eclipse.jgit/src') diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceiveCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceiveCommand.java index 37da6c6462..7c44dba4a2 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceiveCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceiveCommand.java @@ -157,7 +157,7 @@ public class ReceiveCommand { private Ref ref; - private Result status; + private Result status = Result.NOT_ATTEMPTED; private String message; @@ -186,7 +186,6 @@ public class ReceiveCommand { type = Type.CREATE; if (ObjectId.zeroId().equals(newId)) type = Type.DELETE; - status = Result.NOT_ATTEMPTED; } /** -- cgit v1.2.3