append_one_rev(): rewrite to work with object_id

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Michael Haggerty 2015-05-25 18:38:47 +00:00 committed by Junio C Hamano
parent 2e253a4a12
commit 7a456c1eea

View file

@ -536,9 +536,9 @@ static int show_independent(struct commit **rev,
static void append_one_rev(const char *av)
{
unsigned char revkey[20];
if (!get_sha1(av, revkey)) {
append_ref(av, revkey, 0);
struct object_id revkey;
if (!get_sha1(av, revkey.hash)) {
append_ref(av, revkey.hash, 0);
return;
}
if (strchr(av, '*') || strchr(av, '?') || strchr(av, '[')) {