wt-status: rename commitable to committable
Fix variable spelling error. Signed-off-by: Stephen P. Smith <ischis2@cox.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Stephen P. Smith committed
Sep 5, 2018 at 17:53 UTC
6fa9019494f018c560a3979be604f27d12e95659
3 files changed
+15
-15
builtin/commit.c
+9
-9
@@ -507,7 +507,7 @@ static int run_status(FILE *fp, const char *index_file, const char *prefix, int
507
wt_status_collect(s);
508
wt_status_print(s);
509
510
- return s->commitable;
510
+ return s->committable;
511
}
512
513
static int is_a_merge(const struct commit *current_head)
@@ -653,7 +653,7 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
653
{
654
struct stat statbuf;
655
struct strbuf committer_ident = STRBUF_INIT;
656
- int commitable;
656
+ int committable;
657
struct strbuf sb = STRBUF_INIT;
658
const char *hook_arg1 = NULL;
659
const char *hook_arg2 = NULL;
@@ -870,7 +870,7 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
870
871
saved_color_setting = s->use_color;
872
s->use_color = 0;
873
- commitable = run_status(s->fp, index_file, prefix, 1, s);
873
+ committable = run_status(s->fp, index_file, prefix, 1, s);
874
s->use_color = saved_color_setting;
875
} else {
876
struct object_id oid;
@@ -888,7 +888,7 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
888
for (i = 0; i < active_nr; i++)
889
if (ce_intent_to_add(active_cache[i]))
890
ita_nr++;
891
- commitable = active_nr - ita_nr > 0;
891
+ committable = active_nr - ita_nr > 0;
892
} else {
893
/*
894
* Unless the user did explicitly request a submodule
@@ -904,7 +904,7 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
904
if (ignore_submodule_arg &&
905
!strcmp(ignore_submodule_arg, "all"))
906
flags.ignore_submodules = 1;
907
- commitable = index_differs_from(parent, &flags, 1);
907
+ committable = index_differs_from(parent, &flags, 1);
908
}
909
}
910
strbuf_release(&committer_ident);
@@ -916,7 +916,7 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
916
* explicit --allow-empty. In the cherry-pick case, it may be
917
* empty due to conflict resolution, which the user should okay.
918
*/
919
- if (!commitable && whence != FROM_MERGE && !allow_empty &&
919
+ if (!committable && whence != FROM_MERGE && !allow_empty &&
920
!(amend && is_a_merge(current_head))) {
921
s->display_comment_prefix = old_display_comment_prefix;
922
run_status(stdout, index_file, prefix, 0, s);
@@ -1186,14 +1186,14 @@ static int parse_and_validate_options(int argc, const char *argv[],
1186
static int dry_run_commit(int argc, const char **argv, const char *prefix,
1187
const struct commit *current_head, struct wt_status *s)
1188
{
1189
- int commitable;
1189
+ int committable;
1190
const char *index_file;
1191
1192
index_file = prepare_index(argc, argv, prefix, current_head, 1);
1193
- commitable = run_status(stdout, index_file, prefix, 0, s);
1193
+ committable = run_status(stdout, index_file, prefix, 0, s);
1194
rollback_index_files();
1195
1196
- return commitable ? 0 : 1;
1196
+ return committable ? 0 : 1;
1197
}
1198
1199
define_list_config_array_extra(color_status_slots, {"added"});
wt-status.c
+5
-5
@@ -786,7 +786,7 @@ static void wt_longstatus_print_updated(struct wt_status *s)
786
continue;
787
if (!shown_header) {
788
wt_longstatus_print_cached_header(s);
789
- s->commitable = 1;
789
+ s->committable = 1;
790
shown_header = 1;
791
}
792
wt_longstatus_print_change_data(s, WT_STATUS_UPDATED, it);
@@ -1021,7 +1021,7 @@ static void wt_longstatus_print_verbose(struct wt_status *s)
1021
rev.diffopt.use_color = 0;
1022
wt_status_add_cut_line(s->fp);
1023
}
1024
- if (s->verbose > 1 && s->commitable) {
1024
+ if (s->verbose > 1 && s->committable) {
1025
/* print_updated() printed a header, so do we */
1026
if (s->fp != stdout)
1027
wt_longstatus_print_trailer(s);
@@ -1089,7 +1089,7 @@ static void show_merge_in_progress(struct wt_status *s,
1089
_(" (use \"git merge --abort\" to abort the merge)"));
1090
}
1091
} else {
1092
- s-> commitable = 1;
1092
+ s-> committable = 1;
1093
status_printf_ln(s, color,
1094
_("All conflicts fixed but you are still merging."));
1095
if (s->hints)
@@ -1665,14 +1665,14 @@ static void wt_longstatus_print(struct wt_status *s)
1665
"new files yourself (see 'git help status')."),
1666
s->untracked_in_ms / 1000.0);
1667
}
1668
- } else if (s->commitable)
1668
+ } else if (s->committable)
1669
status_printf_ln(s, GIT_COLOR_NORMAL, _("Untracked files not listed%s"),
1670
s->hints
1671
? _(" (use -u option to show untracked files)") : "");
1672
1673
if (s->verbose)
1674
wt_longstatus_print_verbose(s);
1675
- if (!s->commitable) {
1675
+ if (!s->committable) {
1676
if (s->amend)
1677
status_printf_ln(s, GIT_COLOR_NORMAL, _("No changes"));
1678
else if (s->nowarn)
wt-status.h
+1
-1
@@ -96,7 +96,7 @@ struct wt_status {
96
unsigned char sha1_commit[GIT_MAX_RAWSZ]; /* when not Initial */
97
98
/* These are computed during processing of the individual sections */
99
- int commitable;
99
+ int committable;
100
int workdir_dirty;
101
const char *index_file;
102
FILE *fp;