@@ -216,6 +216,7 @@ static int prepare_submodule_summary(struct rev_info *rev, const char *path,
216216}
217217
218218static void print_submodule_summary (struct rev_info * rev , FILE * f ,
219+ const char * line_prefix ,
219220 const char * del , const char * add , const char * reset )
220221{
221222 static const char format [] = " %m %s" ;
@@ -226,6 +227,7 @@ static void print_submodule_summary(struct rev_info *rev, FILE *f,
226227 struct pretty_print_context ctx = {0 };
227228 ctx .date_mode = rev -> date_mode ;
228229 strbuf_setlen (& sb , 0 );
230+ strbuf_addstr (& sb , line_prefix );
229231 if (commit -> object .flags & SYMMETRIC_LEFT ) {
230232 if (del )
231233 strbuf_addstr (& sb , del );
@@ -256,6 +258,7 @@ int parse_fetch_recurse_submodules_arg(const char *opt, const char *arg)
256258}
257259
258260void show_submodule_summary (FILE * f , const char * path ,
261+ const char * line_prefix ,
259262 unsigned char one [20 ], unsigned char two [20 ],
260263 unsigned dirty_submodule , const char * meta ,
261264 const char * del , const char * add , const char * reset )
@@ -280,16 +283,18 @@ void show_submodule_summary(FILE *f, const char *path,
280283 message = "(revision walker failed)" ;
281284
282285 if (dirty_submodule & DIRTY_SUBMODULE_UNTRACKED )
283- fprintf (f , "Submodule %s contains untracked content\n" , path );
286+ fprintf (f , "%sSubmodule %s contains untracked content\n" ,
287+ line_prefix , path );
284288 if (dirty_submodule & DIRTY_SUBMODULE_MODIFIED )
285- fprintf (f , "Submodule %s contains modified content\n" , path );
289+ fprintf (f , "%sSubmodule %s contains modified content\n" ,
290+ line_prefix , path );
286291
287292 if (!hashcmp (one , two )) {
288293 strbuf_release (& sb );
289294 return ;
290295 }
291296
292- strbuf_addf (& sb , "%sSubmodule %s %s.." , meta , path ,
297+ strbuf_addf (& sb , "%s% sSubmodule %s %s.." , line_prefix , meta , path ,
293298 find_unique_abbrev (one , DEFAULT_ABBREV ));
294299 if (!fast_backward && !fast_forward )
295300 strbuf_addch (& sb , '.' );
@@ -301,7 +306,7 @@ void show_submodule_summary(FILE *f, const char *path,
301306 fwrite (sb .buf , sb .len , 1 , f );
302307
303308 if (!message ) /* only NULL if we succeeded in setting up the walk */
304- print_submodule_summary (& rev , f , del , add , reset );
309+ print_submodule_summary (& rev , f , line_prefix , del , add , reset );
305310 if (left )
306311 clear_commit_marks (left , ~0 );
307312 if (right )
0 commit comments