From: Nguyen Thai Ngoc Duy Date: Sat, 26 May 2012 13:01:08 GMT Subject: Re: [PATCHv2 1/2] wt-status: better advices for git status Message-ID: In-Reply-To: <1338035905-24166-1-git-send-email-Lucien.Kong@ensimag.imag.fr> On Sat, May 26, 2012 at 7:38 PM, Kong Lucien wrote: > +       path = mkpath("%s/MERGE_HEAD", git_dir); You can use git_path("MERGE_HEAD") for this, just don't save it. The same for other call sites > +       if(bisect_state) { > +               status_printf_ln(s, c, _("You are currently bisecting.")); > +               status_printf_ln(s, c, _("To get back to the original branch run \"git bisect reset\"")); > +               wt_status_print_trailer(s); > +       } > + > +       if(unmerged_state) { > +               if (conflict) > +                       status_printf_ln(s, c, _("You have unmerged paths: fix conflicts and then commit the result.")); > +               else > +                       status_printf_ln(s, c, _("You are still merging, run \"git commit\" to conclude merge.")); > +               wt_status_print_trailer(s); > +       } Nice. Although git-status is sometimes too heavy I avoid it. But I like this. I don't know, it might help if this info could be printed alone, maybe with an option, without the actual status stuff (changed, cached, others...). > +       if(rebase_state || rebase_interactive_state) { > +               if (conflict) { > +                       status_printf_ln(s, c, _("You are currently rebasing: fix conflicts and then run \"git rebase -- continue\".")); > +                       status_printf_ln(s, c, _("If you would prefer to skip this patch, instead run \"git rebase --skip\".")); > +                       status_printf_ln(s, c, _("To check out  the original branch and stop rebasing run \"git rebase --abort\".")); > +               } > +               else { > +                       if (rebase_state) > +                               status_printf_ln(s, c, _("You are currently rebasing: all conflicts fixed; run \"git rebase --continue\".")); > +                       else { > +                               status_printf_ln(s, c, _("You are currently editing in a rebase progress.")); > +                               status_printf_ln(s, c, _("You can amend the commit with")); > +                               status_printf_ln(s, c, _("      git commit --amend")); > +                               status_printf_ln(s, c, _("Once you are satisfied with your changes, run")); > +                               status_printf_ln(s, c, _("      git rebase --continue")); > +                       } > +               } > +               wt_status_print_trailer(s); > +       } Should this verbose advice be controlled by advice.* config keys? Experienced users know by heart what to do and will appreciate screen estate being used more helpful (to them) info -- Duy