When attempting to use the command in 1.13-pre8
/give @p minecraft:carrot_on_a_stick{tag: {Damage: 7}} 1
Executing the command will give you an undamaged carrot on a stick. You can interchange the item that is being given (the carrot on a stick item is the first item I noticed it on). If you use the carrot on a stick (coas for short) on a pig and then the "coas" takes damage, the NBT becomes something like the following:
tag: {tag: {Damage: 7}, Damage: 7}
I have tested this on all swords and pickaxes, as well as the carrot on a stick. I also tested this back to version 1.13-pre6
Provided NBT starts in the
tag
tag.