The Torah tells us that Yosef was lost and met a "Ish-man". Rashi tells us the "man" was in fact the malach Gavriel. Previously the Torah tells us about an incident where Yaakov interacted with a "Ish-man". However there Rashi tells us it was in fact the Sar of Esav - the guardian angle of Esav!
How does Rashi know when "Ish-man" indicates the good Angle Gavriel and when it indicates the Angle of Esav?