rev-parse: add helper for parsing "--foo/--foo="