Merge branch 'nd/switch-and-restore'
[gitweb.git] / builtin / name-rev.c
index 05ccf53e003144d07e319abb8930fa31623c6632..c785fe16bade1a67d4da782d91b61bdd61d99115 100644 (file)
@@ -40,9 +40,7 @@ static void set_commit_rev_name(struct commit *commit, struct rev_name *name)
 }
 
 static int is_better_name(struct rev_name *name,
-                         const char *tip_name,
                          timestamp_t taggerdate,
-                         int generation,
                          int distance,
                          int from_tag)
 {
@@ -103,8 +101,7 @@ static void name_rev(struct commit *commit,
                name = xmalloc(sizeof(rev_name));
                set_commit_rev_name(commit, name);
                goto copy_data;
-       } else if (is_better_name(name, tip_name, taggerdate,
-                                 generation, distance, from_tag)) {
+       } else if (is_better_name(name, taggerdate, distance, from_tag)) {
 copy_data:
                name->tip_name = tip_name;
                name->taggerdate = taggerdate;
@@ -381,8 +378,7 @@ static void name_rev_line(char *p, struct name_ref_data *data)
                        *(p+1) = 0;
                        if (!get_oid(p - (hexsz - 1), &oid)) {
                                struct object *o =
-                                       lookup_object(the_repository,
-                                                     oid.hash);
+                                       lookup_object(the_repository, &oid);
                                if (o)
                                        name = get_rev_name(o, &buf);
                        }