Skip to content

Commit 88a91a8

Browse files
author
Martin Spielmann
authored
Merge pull request #3 from gitblit/master
Get latest stuff from master before move forward with wicket-7
2 parents 77898a1 + dfa3c3d commit 88a91a8

18 files changed

+1122
-295
lines changed

src/main/distrib/data/defaults.properties

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,21 @@ tickets.acceptNewPatchsets = true
567567
# SINCE 1.4.0
568568
tickets.requireApproval = false
569569

570+
# Default setting to control how patchsets are merged to the integration branch.
571+
# Valid values:
572+
# MERGE_ALWAYS - Always merge with a merge commit. Every ticket will show up as a branch,
573+
# even if it could have been fast-forward merged. This is the default.
574+
# MERGE_IF_NECESSARY - If possible, fast-forward the integration branch,
575+
# if not, merge with a merge commit.
576+
# FAST_FORWARD_ONLY - Only merge when a fast-forward is possible. This produces a strictly
577+
# linear history of the integration branch.
578+
#
579+
# This setting can be overriden per-repository.
580+
#
581+
# RESTART REQUIRED
582+
# SINCE 1.9.0
583+
tickets.mergeType = MERGE_ALWAYS
584+
570585
# The case-insensitive regular expression used to identify and close tickets on
571586
# push to the integration branch for commits that are NOT already referenced as
572587
# a patchset tip.
@@ -1797,6 +1812,10 @@ realm.salesforce.orgId = 0
17971812
realm.ldap.server = ldap://localhost
17981813

17991814
# Login username for LDAP searches.
1815+
# This is usually a user with permissions to search LDAP users and groups.
1816+
# It must have at least have the permission to search users. If it does not
1817+
# have permission to search groups, the normal user logging in must have
1818+
# the permission in LDAP to search groups.
18001819
# If this value is unspecified, anonymous LDAP login will be used.
18011820
#
18021821
# e.g. mydomain\\username
@@ -1809,8 +1828,14 @@ realm.ldap.username = cn=Directory Manager
18091828
# SINCE 1.0.0
18101829
realm.ldap.password = password
18111830

1812-
# Bind pattern for Authentication.
1813-
# Allow to directly authenticate an user without LDAP Searches.
1831+
# Bind pattern for user authentication.
1832+
# Allow to directly authenticate an user without searching for it in LDAP.
1833+
# Use this if the LDAP server does not allow anonymous access and you don't
1834+
# want to use a specific account to run searches. When set, it will override
1835+
# the settings realm.ldap.username and realm.ldap.password.
1836+
# This requires that all relevant user entries are children to the same DN,
1837+
# and that logging users have permission to search for their groups in LDAP.
1838+
# This will disable synchronization as a specific LDAP account is needed for that.
18141839
#
18151840
# e.g. CN=${username},OU=Users,OU=UserControl,OU=MyOrganization,DC=MyDomain
18161841
#
@@ -1926,6 +1951,9 @@ realm.ldap.email = email
19261951
realm.ldap.uid = uid
19271952

19281953
# Defines whether to synchronize all LDAP users and teams into the user service
1954+
# This requires either anonymous LDAP access or that a specific account is set
1955+
# in realm.ldap.username and realm.ldap.password, that has permission to read
1956+
# users and groups in LDAP.
19291957
#
19301958
# Valid values: true, false
19311959
# If left blank, false is assumed

src/main/java/com/gitblit/Constants.java

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,37 @@ public static Transport fromUrl(String url) {
640640
}
641641
}
642642

643+
/**
644+
* The type of merge Gitblit will use when merging a ticket to the integration branch.
645+
* <p>
646+
* The default type is MERGE_ALWAYS.
647+
* <p>
648+
* This is modeled after the Gerrit SubmitType.
649+
*/
650+
public static enum MergeType {
651+
/** Allows a merge only if it can be fast-forward merged into the integration branch. */
652+
FAST_FORWARD_ONLY,
653+
/** Uses a fast-forward merge if possible, other wise a merge commit is created. */
654+
MERGE_IF_NECESSARY,
655+
// Future REBASE_IF_NECESSARY,
656+
/** Always merge with a merge commit, even when a fast-forward would be possible. */
657+
MERGE_ALWAYS,
658+
// Future? CHERRY_PICK
659+
;
660+
661+
public static final MergeType DEFAULT_MERGE_TYPE = MERGE_ALWAYS;
662+
663+
public static MergeType fromName(String name) {
664+
for (MergeType type : values()) {
665+
if (type.name().equalsIgnoreCase(name)) {
666+
return type;
667+
}
668+
}
669+
return DEFAULT_MERGE_TYPE;
670+
}
671+
}
672+
673+
643674
@Documented
644675
@Retention(RetentionPolicy.RUNTIME)
645676
public @interface Unused {

0 commit comments

Comments
 (0)