Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'builtin-name-rev.c')
-rw-r--r--builtin-name-rev.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/builtin-name-rev.c b/builtin-name-rev.c
index cde5de56fa..f153da012f 100644
--- a/builtin-name-rev.c
+++ b/builtin-name-rev.c
@@ -280,9 +280,13 @@ int cmd_name_rev(int argc, const char **argv, const char *prefix)
int i, max;
max = get_max_object_index();
- for (i = 0; i < max; i++)
- show_name(get_indexed_object(i), NULL,
+ for (i = 0; i < max; i++) {
+ struct object *obj = get_indexed_object(i);
+ if (!obj)
+ continue;
+ show_name(obj, NULL,
always, allow_undefined, data.name_only);
+ }
} else {
int i;
for (i = 0; i < revs.nr; i++)