Rust Cohle went undercover twice on True Detective Season 1 Episode 4.
First, he pretended to be Marty's friend. Then, he returned to his old life as fake member of a motorcycle gang called the Iron Crusaders.
The former was an example of how Rust cares about one thing and one thing only: the job. He's willing to lie to Marty, giving him hope that his marriage can be saved, just to ensure that his partner remains focused on the task at hand.