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>
This commit is contained in:
Stephen P. Smith
2018-09-05 17:53:27 -07:00
committed by Junio C Hamano
parent c01d8f9459
commit 6fa9019494
3 changed files with 15 additions and 15 deletions

View File

@ -507,7 +507,7 @@ static int run_status(FILE *fp, const char *index_file, const char *prefix, int
wt_status_collect(s); wt_status_collect(s);
wt_status_print(s); wt_status_print(s);
return s->commitable; return s->committable;
} }
static int is_a_merge(const struct commit *current_head) 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,
{ {
struct stat statbuf; struct stat statbuf;
struct strbuf committer_ident = STRBUF_INIT; struct strbuf committer_ident = STRBUF_INIT;
int commitable; int committable;
struct strbuf sb = STRBUF_INIT; struct strbuf sb = STRBUF_INIT;
const char *hook_arg1 = NULL; const char *hook_arg1 = NULL;
const char *hook_arg2 = NULL; const char *hook_arg2 = NULL;
@ -870,7 +870,7 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
saved_color_setting = s->use_color; saved_color_setting = s->use_color;
s->use_color = 0; s->use_color = 0;
commitable = run_status(s->fp, index_file, prefix, 1, s); committable = run_status(s->fp, index_file, prefix, 1, s);
s->use_color = saved_color_setting; s->use_color = saved_color_setting;
} else { } else {
struct object_id oid; struct object_id oid;
@ -888,7 +888,7 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
for (i = 0; i < active_nr; i++) for (i = 0; i < active_nr; i++)
if (ce_intent_to_add(active_cache[i])) if (ce_intent_to_add(active_cache[i]))
ita_nr++; ita_nr++;
commitable = active_nr - ita_nr > 0; committable = active_nr - ita_nr > 0;
} else { } else {
/* /*
* Unless the user did explicitly request a submodule * Unless the user did explicitly request a submodule
@ -904,7 +904,7 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
if (ignore_submodule_arg && if (ignore_submodule_arg &&
!strcmp(ignore_submodule_arg, "all")) !strcmp(ignore_submodule_arg, "all"))
flags.ignore_submodules = 1; flags.ignore_submodules = 1;
commitable = index_differs_from(parent, &flags, 1); committable = index_differs_from(parent, &flags, 1);
} }
} }
strbuf_release(&committer_ident); strbuf_release(&committer_ident);
@ -916,7 +916,7 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
* explicit --allow-empty. In the cherry-pick case, it may be * explicit --allow-empty. In the cherry-pick case, it may be
* empty due to conflict resolution, which the user should okay. * empty due to conflict resolution, which the user should okay.
*/ */
if (!commitable && whence != FROM_MERGE && !allow_empty && if (!committable && whence != FROM_MERGE && !allow_empty &&
!(amend && is_a_merge(current_head))) { !(amend && is_a_merge(current_head))) {
s->display_comment_prefix = old_display_comment_prefix; s->display_comment_prefix = old_display_comment_prefix;
run_status(stdout, index_file, prefix, 0, s); run_status(stdout, index_file, prefix, 0, s);
@ -1186,14 +1186,14 @@ static int parse_and_validate_options(int argc, const char *argv[],
static int dry_run_commit(int argc, const char **argv, const char *prefix, static int dry_run_commit(int argc, const char **argv, const char *prefix,
const struct commit *current_head, struct wt_status *s) const struct commit *current_head, struct wt_status *s)
{ {
int commitable; int committable;
const char *index_file; const char *index_file;
index_file = prepare_index(argc, argv, prefix, current_head, 1); index_file = prepare_index(argc, argv, prefix, current_head, 1);
commitable = run_status(stdout, index_file, prefix, 0, s); committable = run_status(stdout, index_file, prefix, 0, s);
rollback_index_files(); rollback_index_files();
return commitable ? 0 : 1; return committable ? 0 : 1;
} }
define_list_config_array_extra(color_status_slots, {"added"}); define_list_config_array_extra(color_status_slots, {"added"});

View File

@ -786,7 +786,7 @@ static void wt_longstatus_print_updated(struct wt_status *s)
continue; continue;
if (!shown_header) { if (!shown_header) {
wt_longstatus_print_cached_header(s); wt_longstatus_print_cached_header(s);
s->commitable = 1; s->committable = 1;
shown_header = 1; shown_header = 1;
} }
wt_longstatus_print_change_data(s, WT_STATUS_UPDATED, it); wt_longstatus_print_change_data(s, WT_STATUS_UPDATED, it);
@ -1021,7 +1021,7 @@ static void wt_longstatus_print_verbose(struct wt_status *s)
rev.diffopt.use_color = 0; rev.diffopt.use_color = 0;
wt_status_add_cut_line(s->fp); wt_status_add_cut_line(s->fp);
} }
if (s->verbose > 1 && s->commitable) { if (s->verbose > 1 && s->committable) {
/* print_updated() printed a header, so do we */ /* print_updated() printed a header, so do we */
if (s->fp != stdout) if (s->fp != stdout)
wt_longstatus_print_trailer(s); wt_longstatus_print_trailer(s);
@ -1089,7 +1089,7 @@ static void show_merge_in_progress(struct wt_status *s,
_(" (use \"git merge --abort\" to abort the merge)")); _(" (use \"git merge --abort\" to abort the merge)"));
} }
} else { } else {
s-> commitable = 1; s-> committable = 1;
status_printf_ln(s, color, status_printf_ln(s, color,
_("All conflicts fixed but you are still merging.")); _("All conflicts fixed but you are still merging."));
if (s->hints) if (s->hints)
@ -1665,14 +1665,14 @@ static void wt_longstatus_print(struct wt_status *s)
"new files yourself (see 'git help status')."), "new files yourself (see 'git help status')."),
s->untracked_in_ms / 1000.0); s->untracked_in_ms / 1000.0);
} }
} else if (s->commitable) } else if (s->committable)
status_printf_ln(s, GIT_COLOR_NORMAL, _("Untracked files not listed%s"), status_printf_ln(s, GIT_COLOR_NORMAL, _("Untracked files not listed%s"),
s->hints s->hints
? _(" (use -u option to show untracked files)") : ""); ? _(" (use -u option to show untracked files)") : "");
if (s->verbose) if (s->verbose)
wt_longstatus_print_verbose(s); wt_longstatus_print_verbose(s);
if (!s->commitable) { if (!s->committable) {
if (s->amend) if (s->amend)
status_printf_ln(s, GIT_COLOR_NORMAL, _("No changes")); status_printf_ln(s, GIT_COLOR_NORMAL, _("No changes"));
else if (s->nowarn) else if (s->nowarn)

View File

@ -96,7 +96,7 @@ struct wt_status {
unsigned char sha1_commit[GIT_MAX_RAWSZ]; /* when not Initial */ unsigned char sha1_commit[GIT_MAX_RAWSZ]; /* when not Initial */
/* These are computed during processing of the individual sections */ /* These are computed during processing of the individual sections */
int commitable; int committable;
int workdir_dirty; int workdir_dirty;
const char *index_file; const char *index_file;
FILE *fp; FILE *fp;