@@ -165,6 +165,14 @@ static void show_parents(struct commit *commit, int abbrev)
165
165
}
166
166
}
167
167
168
+ static void show_children (struct rev_info * opt , struct commit * commit , int abbrev )
169
+ {
170
+ struct commit_list * p = lookup_decoration (& opt -> children , & commit -> object );
171
+ for ( ; p ; p = p -> next ) {
172
+ printf (" %s" , find_unique_abbrev (p -> item -> object .sha1 , abbrev ));
173
+ }
174
+ }
175
+
168
176
void show_decorations (struct rev_info * opt , struct commit * commit )
169
177
{
170
178
const char * prefix ;
@@ -414,6 +422,8 @@ void show_log(struct rev_info *opt)
414
422
fputs (find_unique_abbrev (commit -> object .sha1 , abbrev_commit ), stdout );
415
423
if (opt -> print_parents )
416
424
show_parents (commit , abbrev_commit );
425
+ if (opt -> children .name )
426
+ show_children (opt , commit , abbrev_commit );
417
427
show_decorations (opt , commit );
418
428
if (opt -> graph && !graph_is_commit_finished (opt -> graph )) {
419
429
putchar ('\n' );
@@ -473,6 +483,8 @@ void show_log(struct rev_info *opt)
473
483
stdout );
474
484
if (opt -> print_parents )
475
485
show_parents (commit , abbrev_commit );
486
+ if (opt -> children .name )
487
+ show_children (opt , commit , abbrev_commit );
476
488
if (parent )
477
489
printf (" (from %s)" ,
478
490
find_unique_abbrev (parent -> object .sha1 ,
0 commit comments