@@ -508,8 +508,9 @@ static int run_status(FILE *fp, const char *index_file, const char *prefix, int
508
508
509
509
wt_status_collect(s);
510
510
wt_status_print(s);
511
+ wt_status_collect_free_buffers(s);
511
512
512
- return s->commitable ;
513
+ return s->committable ;
513
514
}
514
515
515
516
static int is_a_merge(const struct commit *current_head)
@@ -655,7 +656,7 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
655
656
{
656
657
struct stat statbuf;
657
658
struct strbuf committer_ident = STRBUF_INIT;
658
- int commitable ;
659
+ int committable ;
659
660
struct strbuf sb = STRBUF_INIT;
660
661
const char *hook_arg1 = NULL;
661
662
const char *hook_arg2 = NULL;
@@ -872,7 +873,7 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
872
873
873
874
saved_color_setting = s->use_color;
874
875
s->use_color = 0;
875
- commitable = run_status(s->fp, index_file, prefix, 1, s);
876
+ committable = run_status(s->fp, index_file, prefix, 1, s);
876
877
s->use_color = saved_color_setting;
877
878
string_list_clear(&s->change, 1);
878
879
} else {
@@ -891,7 +892,7 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
891
892
for (i = 0; i < active_nr; i++)
892
893
if (ce_intent_to_add(active_cache[i]))
893
894
ita_nr++;
894
- commitable = active_nr - ita_nr > 0;
895
+ committable = active_nr - ita_nr > 0;
895
896
} else {
896
897
/*
897
898
* Unless the user did explicitly request a submodule
@@ -907,7 +908,7 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
907
908
if (ignore_submodule_arg &&
908
909
!strcmp(ignore_submodule_arg, "all"))
909
910
flags.ignore_submodules = 1;
910
- commitable = index_differs_from(parent, &flags, 1);
911
+ committable = index_differs_from(parent, &flags, 1);
911
912
}
912
913
}
913
914
strbuf_release(&committer_ident);
@@ -919,7 +920,7 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
919
920
* explicit --allow-empty. In the cherry-pick case, it may be
920
921
* empty due to conflict resolution, which the user should okay.
921
922
*/
922
- if (!commitable && whence != FROM_MERGE && !allow_empty &&
923
+ if (!committable && whence != FROM_MERGE && !allow_empty &&
923
924
!(amend && is_a_merge(current_head))) {
924
925
s->display_comment_prefix = old_display_comment_prefix;
925
926
run_status(stdout, index_file, prefix, 0, s);
@@ -1189,14 +1190,14 @@ static int parse_and_validate_options(int argc, const char *argv[],
1189
1190
static int dry_run_commit(int argc, const char **argv, const char *prefix,
1190
1191
const struct commit *current_head, struct wt_status *s)
1191
1192
{
1192
- int commitable ;
1193
+ int committable ;
1193
1194
const char *index_file;
1194
1195
1195
1196
index_file = prepare_index(argc, argv, prefix, current_head, 1);
1196
- commitable = run_status(stdout, index_file, prefix, 0, s);
1197
+ committable = run_status(stdout, index_file, prefix, 0, s);
1197
1198
rollback_index_files();
1198
1199
1199
- return commitable ? 0 : 1;
1200
+ return committable ? 0 : 1;
1200
1201
}
1201
1202
1202
1203
define_list_config_array_extra(color_status_slots, {"added"});
@@ -1391,6 +1392,8 @@ int cmd_status(int argc, const char **argv, const char *prefix)
1391
1392
s.prefix = prefix;
1392
1393
1393
1394
wt_status_print(&s);
1395
+ wt_status_collect_free_buffers(&s);
1396
+
1394
1397
return 0;
1395
1398
}
1396
1399
0 commit comments