Linked issues
Comments 3
Registered as a duplicate of MC-55907 since that one has better info.
http://minecraft.gamepedia.com/Anvil_mechanics#Unit_Repair
If the target does not have the enchantment, it will gain all levels of that enchantment, unless it already has an incompatible enchantment. Enchantments are incompatible if both are in one of the following groups:
Sword: Sharpness, Smite, and Bane of Arthropods
...
Confirmed.