@@ -165,7 +165,7 @@ static void wt_status_print_unmerged_header(struct wt_status *s)
165165 }
166166 }
167167
168- if (!advice_status_hints )
168+ if (!s -> hints )
169169 return ;
170170 if (s -> whence != FROM_COMMIT )
171171 ;
@@ -192,7 +192,7 @@ static void wt_status_print_cached_header(struct wt_status *s)
192192 const char * c = color (WT_STATUS_HEADER , s );
193193
194194 status_printf_ln (s , c , _ ("Changes to be committed:" ));
195- if (!advice_status_hints )
195+ if (!s -> hints )
196196 return ;
197197 if (s -> whence != FROM_COMMIT )
198198 ; /* NEEDSWORK: use "git reset --unresolve"??? */
@@ -210,7 +210,7 @@ static void wt_status_print_dirty_header(struct wt_status *s,
210210 const char * c = color (WT_STATUS_HEADER , s );
211211
212212 status_printf_ln (s , c , _ ("Changes not staged for commit:" ));
213- if (!advice_status_hints )
213+ if (!s -> hints )
214214 return ;
215215 if (!has_deleted )
216216 status_printf_ln (s , c , _ (" (use \"git add <file>...\" to update what will be committed)" ));
@@ -228,7 +228,7 @@ static void wt_status_print_other_header(struct wt_status *s,
228228{
229229 const char * c = color (WT_STATUS_HEADER , s );
230230 status_printf_ln (s , c , "%s:" , what );
231- if (!advice_status_hints )
231+ if (!s -> hints )
232232 return ;
233233 status_printf_ln (s , c , _ (" (use \"git %s <file>...\" to include in what will be committed)" ), how );
234234 status_printf_ln (s , c , "" );
@@ -846,13 +846,13 @@ static void show_merge_in_progress(struct wt_status *s,
846846{
847847 if (has_unmerged (s )) {
848848 status_printf_ln (s , color , _ ("You have unmerged paths." ));
849- if (advice_status_hints )
849+ if (s -> hints )
850850 status_printf_ln (s , color ,
851851 _ (" (fix conflicts and run \"git commit\")" ));
852852 } else {
853853 status_printf_ln (s , color ,
854854 _ ("All conflicts fixed but you are still merging." ));
855- if (advice_status_hints )
855+ if (s -> hints )
856856 status_printf_ln (s , color ,
857857 _ (" (use \"git commit\" to conclude merge)" ));
858858 }
@@ -868,7 +868,7 @@ static void show_am_in_progress(struct wt_status *s,
868868 if (state -> am_empty_patch )
869869 status_printf_ln (s , color ,
870870 _ ("The current patch is empty." ));
871- if (advice_status_hints ) {
871+ if (s -> hints ) {
872872 if (!state -> am_empty_patch )
873873 status_printf_ln (s , color ,
874874 _ (" (fix conflicts and then run \"git am --continue\")" ));
@@ -941,7 +941,7 @@ static void show_rebase_in_progress(struct wt_status *s,
941941 else
942942 status_printf_ln (s , color ,
943943 _ ("You are currently rebasing." ));
944- if (advice_status_hints ) {
944+ if (s -> hints ) {
945945 status_printf_ln (s , color ,
946946 _ (" (fix conflicts and then run \"git rebase --continue\")" ));
947947 status_printf_ln (s , color ,
@@ -958,7 +958,7 @@ static void show_rebase_in_progress(struct wt_status *s,
958958 else
959959 status_printf_ln (s , color ,
960960 _ ("You are currently rebasing." ));
961- if (advice_status_hints )
961+ if (s -> hints )
962962 status_printf_ln (s , color ,
963963 _ (" (all conflicts fixed: run \"git rebase --continue\")" ));
964964 } else if (split_commit_in_progress (s )) {
@@ -970,7 +970,7 @@ static void show_rebase_in_progress(struct wt_status *s,
970970 else
971971 status_printf_ln (s , color ,
972972 _ ("You are currently splitting a commit during a rebase." ));
973- if (advice_status_hints )
973+ if (s -> hints )
974974 status_printf_ln (s , color ,
975975 _ (" (Once your working directory is clean, run \"git rebase --continue\")" ));
976976 } else {
@@ -982,7 +982,7 @@ static void show_rebase_in_progress(struct wt_status *s,
982982 else
983983 status_printf_ln (s , color ,
984984 _ ("You are currently editing a commit during a rebase." ));
985- if (advice_status_hints && !s -> amend ) {
985+ if (s -> hints && !s -> amend ) {
986986 status_printf_ln (s , color ,
987987 _ (" (use \"git commit --amend\" to amend the current commit)" ));
988988 status_printf_ln (s , color ,
@@ -997,7 +997,7 @@ static void show_cherry_pick_in_progress(struct wt_status *s,
997997 const char * color )
998998{
999999 status_printf_ln (s , color , _ ("You are currently cherry-picking." ));
1000- if (advice_status_hints ) {
1000+ if (s -> hints ) {
10011001 if (has_unmerged (s ))
10021002 status_printf_ln (s , color ,
10031003 _ (" (fix conflicts and run \"git cherry-pick --continue\")" ));
@@ -1016,7 +1016,7 @@ static void show_revert_in_progress(struct wt_status *s,
10161016{
10171017 status_printf_ln (s , color , _ ("You are currently reverting commit %s." ),
10181018 find_unique_abbrev (state -> revert_head_sha1 , DEFAULT_ABBREV ));
1019- if (advice_status_hints ) {
1019+ if (s -> hints ) {
10201020 if (has_unmerged (s ))
10211021 status_printf_ln (s , color ,
10221022 _ (" (fix conflicts and run \"git revert --continue\")" ));
@@ -1040,7 +1040,7 @@ static void show_bisect_in_progress(struct wt_status *s,
10401040 else
10411041 status_printf_ln (s , color ,
10421042 _ ("You are currently bisecting." ));
1043- if (advice_status_hints )
1043+ if (s -> hints )
10441044 status_printf_ln (s , color ,
10451045 _ (" (use \"git bisect reset\" to get back to the original branch)" ));
10461046 wt_status_print_trailer (s );
@@ -1278,7 +1278,7 @@ void wt_status_print(struct wt_status *s)
12781278 }
12791279 } else if (s -> commitable )
12801280 status_printf_ln (s , GIT_COLOR_NORMAL , _ ("Untracked files not listed%s" ),
1281- advice_status_hints
1281+ s -> hints
12821282 ? _ (" (use -u option to show untracked files)" ) : "" );
12831283
12841284 if (s -> verbose )
@@ -1289,25 +1289,25 @@ void wt_status_print(struct wt_status *s)
12891289 else if (s -> nowarn )
12901290 ; /* nothing */
12911291 else if (s -> workdir_dirty ) {
1292- if (advice_status_hints )
1292+ if (s -> hints )
12931293 printf (_ ("no changes added to commit "
12941294 "(use \"git add\" and/or \"git commit -a\")\n" ));
12951295 else
12961296 printf (_ ("no changes added to commit\n" ));
12971297 } else if (s -> untracked .nr ) {
1298- if (advice_status_hints )
1298+ if (s -> hints )
12991299 printf (_ ("nothing added to commit but untracked files "
13001300 "present (use \"git add\" to track)\n" ));
13011301 else
13021302 printf (_ ("nothing added to commit but untracked files present\n" ));
13031303 } else if (s -> is_initial ) {
1304- if (advice_status_hints )
1304+ if (s -> hints )
13051305 printf (_ ("nothing to commit (create/copy files "
13061306 "and use \"git add\" to track)\n" ));
13071307 else
13081308 printf (_ ("nothing to commit\n" ));
13091309 } else if (!s -> show_untracked_files ) {
1310- if (advice_status_hints )
1310+ if (s -> hints )
13111311 printf (_ ("nothing to commit (use -u to show untracked files)\n" ));
13121312 else
13131313 printf (_ ("nothing to commit\n" ));
0 commit comments