sha1_name.c: allow get_short_sha1() to take other flags