Merge branch 'ss/submodule-summary-in-c'
Yet another subcommand of "git submodule" is getting rewritten in C. * ss/submodule-summary-in-c: submodule: port submodule subcommand 'summary' from shell to C t7421: introduce a test script for verifying 'summary' output submodule: rename helper functions to avoid ambiguity submodule: remove extra line feeds between callback struct and macro
This commit is contained in:
10
submodule.c
10
submodule.c
@ -438,7 +438,7 @@ void handle_ignore_submodules_arg(struct diff_options *diffopt,
|
||||
*/
|
||||
}
|
||||
|
||||
static int prepare_submodule_summary(struct rev_info *rev, const char *path,
|
||||
static int prepare_submodule_diff_summary(struct rev_info *rev, const char *path,
|
||||
struct commit *left, struct commit *right,
|
||||
struct commit_list *merge_bases)
|
||||
{
|
||||
@ -459,7 +459,7 @@ static int prepare_submodule_summary(struct rev_info *rev, const char *path,
|
||||
return prepare_revision_walk(rev);
|
||||
}
|
||||
|
||||
static void print_submodule_summary(struct repository *r, struct rev_info *rev, struct diff_options *o)
|
||||
static void print_submodule_diff_summary(struct repository *r, struct rev_info *rev, struct diff_options *o)
|
||||
{
|
||||
static const char format[] = " %m %s";
|
||||
struct strbuf sb = STRBUF_INIT;
|
||||
@ -610,7 +610,7 @@ output_header:
|
||||
strbuf_release(&sb);
|
||||
}
|
||||
|
||||
void show_submodule_summary(struct diff_options *o, const char *path,
|
||||
void show_submodule_diff_summary(struct diff_options *o, const char *path,
|
||||
struct object_id *one, struct object_id *two,
|
||||
unsigned dirty_submodule)
|
||||
{
|
||||
@ -632,12 +632,12 @@ void show_submodule_summary(struct diff_options *o, const char *path,
|
||||
goto out;
|
||||
|
||||
/* Treat revision walker failure the same as missing commits */
|
||||
if (prepare_submodule_summary(&rev, path, left, right, merge_bases)) {
|
||||
if (prepare_submodule_diff_summary(&rev, path, left, right, merge_bases)) {
|
||||
diff_emit_submodule_error(o, "(revision walker failed)\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
print_submodule_summary(sub, &rev, o);
|
||||
print_submodule_diff_summary(sub, &rev, o);
|
||||
|
||||
out:
|
||||
if (merge_bases)
|
||||
|
Reference in New Issue
Block a user