When deploying from a Salesforce organisation to source control, certain XML files may unexpectedly include Salesforce namespaces (http://soap.sforce.com/2006/04/metadata) in some of their nodes.
Example:
This issue typically arises in XML files that have been manually edited and additional whitespace being inserted following the opening XML node.
โ
โIf this is an Org to Branch deployment then this can be confirmed by opening the file on your Target branch in source control and checking for the existence of whitespace.
โ
If it is a Branch to Branch deployment then both the Source and Target branches will need to be checked.
These additional namespaces do not cause problems with validations or deployments, however it will constitute as noise in a code review.
โ
To resolve this, it's recommended to eliminate the extra whitespace from the impacted nodes and then proceed with a new deployment to source control.