Problem merging changes to worldserver.conf.dist

I’ve been working on two separate patches that each add a new config option. Problem is that I can only apply one patch, the other errors with a merge conflict in worldserver.conf.dist.

Details:

Patch_A adds “AllowTrackBothResources” to worldserver.conf.dist

Patch_B adds “AuctionhouseExpireQueryLimit” to worldserver.conf.dist

[ul][li]The patches were created in their own branches[/li][li]The patches were exported individually after they were committed to their own branch[/li][li]The patches were applied to a clean pull of the master repo[/li]
[li]Using a clean repo (no additional patches), if I apply Patch_A first, Patch_B won’t apply. If I apply Patch_B first, Patch_A won’t apply[/li]
[li]Using a repo with AuctionhouseBot applied[/li]I can apply Patch_A before or after AuctionhouseBot without error
[li]I can apply Patch_B before or after AuctionhouseBot without error[/li][li]I can not apply both Patch_A and Patch_B[/li]
[/ul]

I don’t understand why these particular patches error. I have other patches that modify the config and they can all be applied together without problems. I have also tried git apply --verbose but it doesn’t tell me what the conflict is.

I can’t believe it has to do with offsets, AuctionhouseBot adds a ton of config entries but that doesn’t prevent me from merging other patches that modify the config. But if it does have to do with offsets, how can I publish the two patches individually in such a way that they can be used together?

This is the result after the failed merge:

###################################################################################################

CUSTOM SERVER OPTIONS

<<<<<<< HEAD

AllowTrackBothResources

Description: Allows players to track herbs and minerals at the same time (if they have the skills)

Default: 0 (do not allow)

1 (allow)

AllowTrackBothResources = 0

AuctionhouseExpireQueryLimit

Description: Allows limiting of the number of auctions expired per auctionhouse update

to help reduce lag spikes from massive number of auctions expiring per update

Default: 0 (no limit)

AuctionhouseExpireQueryLimit = 0

auctionExpireLimit

This is what it should look like with only Patch_A:

###################################################################################################

CUSTOM SERVER OPTIONS

AllowTrackBothResources

Description: Allows players to track herbs and minerals at the same time (if they have the skills)

Default: 0 (do not allow)

1 (allow)

AllowTrackBothResources = 0

This is what it should look like with only Patch_B:

###################################################################################################

CUSTOM SERVER OPTIONS

AuctionhouseExpireQueryLimit

Description: Allows limiting of the number of auctions expired per auctionhouse update

to help reduce lag spikes from massive number of auctions expiring per update

Default: 0 (no limit)

AuctionhouseExpireQueryLimit = 0

This is what it should look like with both patches applied:

###################################################################################################

CUSTOM SERVER OPTIONS

AllowTrackBothResources

Description: Allows players to track herbs and minerals at the same time (if they have the skills)

Default: 0 (do not allow)

1 (allow)

AllowTrackBothResources = 0

AuctionhouseExpireQueryLimit

Description: Allows limiting of the number of auctions expired per auctionhouse update

to help reduce lag spikes from massive number of auctions expiring per update

Default: 0 (no limit)

AuctionhouseExpireQueryLimit = 0

Well, the solution was to move one of the config changes to a random place under CUSTOM_SERVER_OPTIONS.

Apparently git got confused by both patches trying to insert something directly under the header # CUSTOM SERVER OPTIONS. Git doesn’t seem smart enough to insert the first patch and then push it down a bit and insert the second patch, which is strange because the anchor line (# custom server options) still exists and was not modified.