Combine get_rev and get_origin into one system call