عُمَرُ: specific proper name, nominative diptote. عُمَرٌ: an indefinite bearer of the name, nominative triptote.
مَرَرْتُ بِعُمَرَ: with the specific name, genitive fatḥah. As an added teaching example, مَرَرْتُ بِعُمَرٍ آخَرَ: “I passed another ʿUmar”; عُمَرٍ has genitive kasrah with tanwīn, but its adjective آخَرَ has genitive fatḥah.