diff options
author | Florian Zschocke <florian.zschocke@cycos.com> | 2014-06-21 02:53:21 +0200 |
---|---|---|
committer | Florian Zschocke <florian.zschocke@devolo.de> | 2016-10-28 11:02:25 +0200 |
commit | 5c44219084e825feea72c60a83bc6889e3cf1bc9 (patch) | |
tree | 1c2262cc18f54fa0d08579abbdd109dc3a9b54aa /src/main/java/com/gitblit/models | |
parent | d10fe0d8fd614f6ae6606179b0326bdc6a5f6af8 (diff) | |
download | gitblit-5c44219084e825feea72c60a83bc6889e3cf1bc9.tar.gz gitblit-5c44219084e825feea72c60a83bc6889e3cf1bc9.zip |
Add integration strategy to merge tickes fast-forward or with commit.
Add the option to merge a ticket branch to the integration branch
only when it can be fast-forwarded, or
always with a merge commit, or
by fast-foward if possible, otherwise with a merge commit.
Adds a new property ticket.mergeType with the valid values
FAST_FOWARD_ONLY, MERGE_ALWAYS and MERGE_IF_NECESSARY.
Merging and canMerge were refactored to make use of a new
IntegrationStrategy class for each type of strategy.
Diffstat (limited to 'src/main/java/com/gitblit/models')
-rw-r--r-- | src/main/java/com/gitblit/models/RepositoryModel.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/com/gitblit/models/RepositoryModel.java b/src/main/java/com/gitblit/models/RepositoryModel.java index a81c622a..67ee1c7e 100644 --- a/src/main/java/com/gitblit/models/RepositoryModel.java +++ b/src/main/java/com/gitblit/models/RepositoryModel.java @@ -28,6 +28,7 @@ import com.gitblit.Constants.AccessRestrictionType; import com.gitblit.Constants.AuthorizationControl;
import com.gitblit.Constants.CommitMessageRenderer;
import com.gitblit.Constants.FederationStrategy;
+import com.gitblit.Constants.MergeType;
import com.gitblit.utils.ArrayUtils;
import com.gitblit.utils.ModelUtils;
import com.gitblit.utils.StringUtils;
@@ -89,6 +90,7 @@ public class RepositoryModel implements Serializable, Comparable<RepositoryModel public boolean acceptNewTickets;
public boolean requireApproval; public String mergeTo;
+ public MergeType mergeType;
public transient boolean isCollectingGarbage;
public Date lastGC;
@@ -111,6 +113,7 @@ public class RepositoryModel implements Serializable, Comparable<RepositoryModel this.isBare = true;
this.acceptNewTickets = true;
this.acceptNewPatchsets = true;
+ this.mergeType = MergeType.DEFAULT_MERGE_TYPE;
addOwner(owner);
}
|