summaryrefslogtreecommitdiff
path: root/name-rev.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-07-03 03:14:32 -0700
committerJunio C Hamano <junkio@cox.net>2006-07-03 03:16:52 -0700
commitf23c75a8eca5eeabf9aaf303ee7e14a94da42ddc (patch)
treee8379d2e091dcdabb623ebbe8b7a1ee53be308a9 /name-rev.c
parent160b7983034cdd24ea1bf6ef7a2532a2296461c6 (diff)
parent8fced61cbc32f0c4b81a3dcecfeb40b7d96339ce (diff)
downloadgit-f23c75a8eca5eeabf9aaf303ee7e14a94da42ddc.tar.gz
Merge branch 'master' into js/merge-base
This is to pull in the object-hash clean-up from the master branch.
Diffstat (limited to 'name-rev.c')
-rw-r--r--name-rev.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/name-rev.c b/name-rev.c
index 3a5ac35d16..6a23f2d8a2 100644
--- a/name-rev.c
+++ b/name-rev.c
@@ -234,12 +234,15 @@ int main(int argc, char **argv)
fwrite(p_start, p - p_start, 1, stdout);
}
} else if (all) {
- int i;
+ int i, max;
- for (i = 0; i < obj_allocs; i++)
- if (objs[i])
- printf("%s %s\n", sha1_to_hex(objs[i]->sha1),
- get_rev_name(objs[i]));
+ max = get_max_object_index();
+ for (i = 0; i < max; i++) {
+ struct object * obj = get_indexed_object(i);
+ if (!obj)
+ continue;
+ printf("%s %s\n", sha1_to_hex(obj->sha1), get_rev_name(obj));
+ }
} else {
int i;
for (i = 0; i < revs.nr; i++)