Re: [PATCH v6 05/17] ref-filter: move get_head_description() from branch.c
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 17, 2016, 19:59 UTC
- Message-ID
- <xmqqtwhwv4kd.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <1463309133-14503-6-git-send-email-Karthik.188@gmail.com>
Karthik Nayak <karthik.188@gmail.com> writes:
Show 33 quoted lines
> diff --git a/builtin/branch.c b/builtin/branch.c
> index 2ecde53..141168d 100644
> --- a/builtin/branch.c
> +++ b/builtin/branch.c
> @@ -361,39 +361,6 @@ static void add_verbose_info(struct strbuf *out, struct ref_array_item *item,
> strbuf_release(&subject);
> }
>
> -static char *get_head_description(void)
> -{
> - struct strbuf desc = STRBUF_INIT;
> - struct wt_status_state state;
> - memset(&state, 0, sizeof(state));
> - wt_status_get_state(&state, 1);
> - if (state.rebase_in_progress ||
> - state.rebase_interactive_in_progress)
> - strbuf_addf(&desc, _("(no branch, rebasing %s)"),
> - state.branch);
> - else if (state.bisect_in_progress)
> - strbuf_addf(&desc, _("(no branch, bisect started on %s)"),
> - state.branch);
> - else if (state.detached_from) {
> - if (state.detached_at)
> - /* TRANSLATORS: make sure this matches
> - "HEAD detached at " in wt-status.c */
> - strbuf_addf(&desc, _("(HEAD detached at %s)"),
> - state.detached_from);
> - else
> - /* TRANSLATORS: make sure this matches
> - "HEAD detached from " in wt-status.c */
> - strbuf_addf(&desc, _("(HEAD detached from %s)"),
> - state.detached_from);
> - }Note that this expects that va/i18n-misc-updates topic, which corrects the translator instruction around here, is already applied.
Show 26 quoted lines
> diff --git a/ref-filter.c b/ref-filter.c
> index 7d3af1c..fcb3353 100644
> ...
> +char *get_head_description(void)
> +{
> + struct strbuf desc = STRBUF_INIT;
> + struct wt_status_state state;
> + memset(&state, 0, sizeof(state));
> + wt_status_get_state(&state, 1);
> + if (state.rebase_in_progress ||
> + state.rebase_interactive_in_progress)
> + strbuf_addf(&desc, _("(no branch, rebasing %s)"),
> + state.branch);
> + else if (state.bisect_in_progress)
> + strbuf_addf(&desc, _("(no branch, bisect started on %s)"),
> + state.branch);
> + else if (state.detached_from) {
> + /* TRANSLATORS: make sure these match _("HEAD detached at ")
> + and _("HEAD detached from ") in wt-status.c */
> + if (state.detached_at)
> + strbuf_addf(&desc, _("(HEAD detached at %s)"),
> + state.detached_from);
> + else
> + strbuf_addf(&desc, _("(HEAD detached from %s)"),
> + state.detached_from);
> + }... but the change is apparently lost.
It is a good lesson not to blindly rebase things on 'next', which would have unrelated changes. If you needed es/test-gpg-tags topic for the test script change, check out 'master', merge that single topic, and then rebase the series on top of the result.