append_one_rev(): rewrite to work with object_id
authorMichael Haggerty <mhagger@alum.mit.edu>
Mon, 25 May 2015 18:38:47 +0000 (18:38 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 25 May 2015 19:19:31 +0000 (12:19 -0700)
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>
builtin/show-branch.c
index 7e006577e26752d3741ebd97ea6d3722e6b8db9f..b861e4192601f59a4537a1aa7e40b6398afa53f2 100644 (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, '[')) {