From: Jakub Narebski <jnareb@gmail.com>
To: Pierre Habouzit <madcoder@debian.org>
Cc: Junio C Hamano <gitster@pobox.com>, Git ML <git@vger.kernel.org>
Subject: Re: [PATCH v2] status: display "doing what" information in git status
Date: Fri, 06 May 2011 03:13:55 -0700 (PDT) [thread overview]
Message-ID: <m3oc3guogs.fsf@localhost.localdomain> (raw)
In-Reply-To: <1304667535-4787-1-git-send-email-madcoder@debian.org>
Pierre Habouzit <madcoder@debian.org> writes:
> This provides the same information as the git bash prompt about the
> current operation that is going on: rebase, merge, am, cherry-pick or
> bisect.
>
> This is very useful for "beginners" who don't have their shell prompt set
> up for git.
>
> The logic has been largely borrowed from
> contrib/completion/git-completion.bash
Very nice idea.
> when hints are enabled, it also gives hints on how to abort or resolve
s/^when/When/
> If we have an ongoing operation then:
> - if we are on a branch it displays:
> # On branch $branch ($what_is_ongoing)
> # ($ongoing_hint)
> - if we are on a detached head it displays:
> # $what_is_ongoing (detached head)
> # ($ongoing_hint)
>
> If we have no ongoing operation the git status does as before:
> - if we are on a branch it displays:
> # On branch $branch
> - if we are on a detached head it displays:
> # Not currently on any branch.
Very nice to have such example in commit message.
> Since the ongoing operation is usually something to be done with before
> continuing with further git operations, the hint and ongoing operations
> are displayed with the "WT_STATUS_NOBRANCH" color to be easy to spot.
>
> Signed-off-by: Pierre Habouzit <madcoder@debian.org>
> ---
> wt-status.c | 138 ++++++++++++++++++++++++++++++++++++++++++++++++++++------
> 1 files changed, 123 insertions(+), 15 deletions(-)
Could you please add some *tests* for this new feature?
Don't forget to mark it with C_LOCALE_OUTPUT or use test_i18ncmp /
/ test_i18ngrep in tests.
> +static void wt_status_print_doingwhat(struct wt_status *s)
> +{
> + const char *status_nobranch = color(WT_STATUS_NOBRANCH, s);
> + const char *branch_name = s->branch;
> + const char *advice = NULL;
> +
> + const char * const rebase_advice =
> + _("use \"git rebase --abort\" to abort current rebase or proceed");
> + const char * const am_advice =
> + _("use \"git am --abort\" to abort current mailbox apply or proceed");
> + const char * const merge_advice =
> + _("use \"git reset --hard\" to abort, or resolve conflicts and commit");
Thanks for marking it up for i18n... though I am not sure if we should
use _() or N_() here...
--
Jakub Narebski
Poland
ShadeHawk on #git
next prev parent reply other threads:[~2011-05-06 10:14 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-05 21:48 [PATCH 1/1] status: display "doing what" information in git status Pierre Habouzit
2011-05-05 23:06 ` Sverre Rabbelier
2011-05-05 23:26 ` Pierre Habouzit
2011-05-06 7:48 ` Michael J Gruber
2011-05-06 8:04 ` Pierre Habouzit
2011-05-05 23:37 ` Junio C Hamano
2011-05-05 23:39 ` Pierre Habouzit
2011-05-05 23:47 ` Pierre Habouzit
2011-05-05 23:49 ` Junio C Hamano
2011-05-05 23:51 ` Pierre Habouzit
2011-05-06 7:38 ` [PATCH v2] " Pierre Habouzit
2011-05-06 10:13 ` Jakub Narebski [this message]
2011-05-06 17:40 ` Pierre Habouzit
2011-05-06 17:29 ` Junio C Hamano
2011-05-06 17:36 ` Pierre Habouzit
2011-05-06 18:24 ` Junio C Hamano
2011-05-06 18:40 ` Matthieu Moy
2011-05-06 18:44 ` Pierre Habouzit
2011-05-06 19:15 ` Matthieu Moy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3oc3guogs.fsf@localhost.localdomain \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=madcoder@debian.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).