Skip to content

Commit 6fa9019

Browse files
Stephen P. Smithgitster
authored andcommitted
wt-status: rename commitable to committable
Fix variable spelling error. Signed-off-by: Stephen P. Smith <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent c01d8f9 commit 6fa9019

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

builtin/commit.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ static int run_status(FILE *fp, const char *index_file, const char *prefix, int
507507
wt_status_collect(s);
508508
wt_status_print(s);
509509

510-
return s->commitable;
510+
return s->committable;
511511
}
512512

513513
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,
653653
{
654654
struct stat statbuf;
655655
struct strbuf committer_ident = STRBUF_INIT;
656-
int commitable;
656+
int committable;
657657
struct strbuf sb = STRBUF_INIT;
658658
const char *hook_arg1 = NULL;
659659
const char *hook_arg2 = NULL;
@@ -870,7 +870,7 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
870870

871871
saved_color_setting = s->use_color;
872872
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);
874874
s->use_color = saved_color_setting;
875875
} else {
876876
struct object_id oid;
@@ -888,7 +888,7 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
888888
for (i = 0; i < active_nr; i++)
889889
if (ce_intent_to_add(active_cache[i]))
890890
ita_nr++;
891-
commitable = active_nr - ita_nr > 0;
891+
committable = active_nr - ita_nr > 0;
892892
} else {
893893
/*
894894
* Unless the user did explicitly request a submodule
@@ -904,7 +904,7 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
904904
if (ignore_submodule_arg &&
905905
!strcmp(ignore_submodule_arg, "all"))
906906
flags.ignore_submodules = 1;
907-
commitable = index_differs_from(parent, &flags, 1);
907+
committable = index_differs_from(parent, &flags, 1);
908908
}
909909
}
910910
strbuf_release(&committer_ident);
@@ -916,7 +916,7 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
916916
* explicit --allow-empty. In the cherry-pick case, it may be
917917
* empty due to conflict resolution, which the user should okay.
918918
*/
919-
if (!commitable && whence != FROM_MERGE && !allow_empty &&
919+
if (!committable && whence != FROM_MERGE && !allow_empty &&
920920
!(amend && is_a_merge(current_head))) {
921921
s->display_comment_prefix = old_display_comment_prefix;
922922
run_status(stdout, index_file, prefix, 0, s);
@@ -1186,14 +1186,14 @@ static int parse_and_validate_options(int argc, const char *argv[],
11861186
static int dry_run_commit(int argc, const char **argv, const char *prefix,
11871187
const struct commit *current_head, struct wt_status *s)
11881188
{
1189-
int commitable;
1189+
int committable;
11901190
const char *index_file;
11911191

11921192
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);
11941194
rollback_index_files();
11951195

1196-
return commitable ? 0 : 1;
1196+
return committable ? 0 : 1;
11971197
}
11981198

11991199
define_list_config_array_extra(color_status_slots, {"added"});

wt-status.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ static void wt_longstatus_print_updated(struct wt_status *s)
786786
continue;
787787
if (!shown_header) {
788788
wt_longstatus_print_cached_header(s);
789-
s->commitable = 1;
789+
s->committable = 1;
790790
shown_header = 1;
791791
}
792792
wt_longstatus_print_change_data(s, WT_STATUS_UPDATED, it);
@@ -1021,7 +1021,7 @@ static void wt_longstatus_print_verbose(struct wt_status *s)
10211021
rev.diffopt.use_color = 0;
10221022
wt_status_add_cut_line(s->fp);
10231023
}
1024-
if (s->verbose > 1 && s->commitable) {
1024+
if (s->verbose > 1 && s->committable) {
10251025
/* print_updated() printed a header, so do we */
10261026
if (s->fp != stdout)
10271027
wt_longstatus_print_trailer(s);
@@ -1089,7 +1089,7 @@ static void show_merge_in_progress(struct wt_status *s,
10891089
_(" (use \"git merge --abort\" to abort the merge)"));
10901090
}
10911091
} else {
1092-
s-> commitable = 1;
1092+
s-> committable = 1;
10931093
status_printf_ln(s, color,
10941094
_("All conflicts fixed but you are still merging."));
10951095
if (s->hints)
@@ -1665,14 +1665,14 @@ static void wt_longstatus_print(struct wt_status *s)
16651665
"new files yourself (see 'git help status')."),
16661666
s->untracked_in_ms / 1000.0);
16671667
}
1668-
} else if (s->commitable)
1668+
} else if (s->committable)
16691669
status_printf_ln(s, GIT_COLOR_NORMAL, _("Untracked files not listed%s"),
16701670
s->hints
16711671
? _(" (use -u option to show untracked files)") : "");
16721672

16731673
if (s->verbose)
16741674
wt_longstatus_print_verbose(s);
1675-
if (!s->commitable) {
1675+
if (!s->committable) {
16761676
if (s->amend)
16771677
status_printf_ln(s, GIT_COLOR_NORMAL, _("No changes"));
16781678
else if (s->nowarn)

wt-status.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ struct wt_status {
9696
unsigned char sha1_commit[GIT_MAX_RAWSZ]; /* when not Initial */
9797

9898
/* These are computed during processing of the individual sections */
99-
int commitable;
99+
int committable;
100100
int workdir_dirty;
101101
const char *index_file;
102102
FILE *fp;

0 commit comments

Comments
 (0)