Fairly ambiguous and is often open to debate on it's correct application.
Historically it has been used to politely ask someone at, say, a formal dinner, if they have farted or indeed, have actually shat their smalls. The use of "have I" helping to ease the embarrasement of the situation.
"excuse me, would you pass the gravy"

"certainly, my pleasure"

(sudden smell of shit is apparant)

"pardon me, but shit yourself, have I?"
by ANNA! April 5, 2020
Get the Shit yourself, have I? mug.