@@ -216,6 +216,7 @@ static int prepare_submodule_summary(struct rev_info *rev, const char *path,
216
216
}
217
217
218
218
static void print_submodule_summary (struct rev_info * rev , FILE * f ,
219
+ const char * line_prefix ,
219
220
const char * del , const char * add , const char * reset )
220
221
{
221
222
static const char format [] = " %m %s" ;
@@ -226,6 +227,7 @@ static void print_submodule_summary(struct rev_info *rev, FILE *f,
226
227
struct pretty_print_context ctx = {0 };
227
228
ctx .date_mode = rev -> date_mode ;
228
229
strbuf_setlen (& sb , 0 );
230
+ strbuf_addstr (& sb , line_prefix );
229
231
if (commit -> object .flags & SYMMETRIC_LEFT ) {
230
232
if (del )
231
233
strbuf_addstr (& sb , del );
@@ -256,6 +258,7 @@ int parse_fetch_recurse_submodules_arg(const char *opt, const char *arg)
256
258
}
257
259
258
260
void show_submodule_summary (FILE * f , const char * path ,
261
+ const char * line_prefix ,
259
262
unsigned char one [20 ], unsigned char two [20 ],
260
263
unsigned dirty_submodule , const char * meta ,
261
264
const char * del , const char * add , const char * reset )
@@ -280,16 +283,18 @@ void show_submodule_summary(FILE *f, const char *path,
280
283
message = "(revision walker failed)" ;
281
284
282
285
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 );
284
288
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 );
286
291
287
292
if (!hashcmp (one , two )) {
288
293
strbuf_release (& sb );
289
294
return ;
290
295
}
291
296
292
- strbuf_addf (& sb , "%sSubmodule %s %s.." , meta , path ,
297
+ strbuf_addf (& sb , "%s% sSubmodule %s %s.." , line_prefix , meta , path ,
293
298
find_unique_abbrev (one , DEFAULT_ABBREV ));
294
299
if (!fast_backward && !fast_forward )
295
300
strbuf_addch (& sb , '.' );
@@ -301,7 +306,7 @@ void show_submodule_summary(FILE *f, const char *path,
301
306
fwrite (sb .buf , sb .len , 1 , f );
302
307
303
308
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 );
305
310
if (left )
306
311
clear_commit_marks (left , ~0 );
307
312
if (right )
0 commit comments