git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/2] status: show 'revert' state and status hint

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 2, 2013, 20:19 UTC
Message-ID
<7vobdwbs86.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1364912422-29536-1-git-send-email-Matthieu.Moy@imag.fr>
Matthieu Moy <Matthieu.Moy@imag.fr> writes:
Show 16 quoted lines
> +static void show_revert_in_progress(struct wt_status *s,
> +					struct wt_status_state *state,
> +					const char *color)
> +{
> +	status_printf_ln(s, color, _("You are currently reverting a commit."));
> +	if (advice_status_hints) {
> +		if (has_unmerged(s))
> +			status_printf_ln(s, color,
> +				_("  (fix conflicts and run \"git revert --continue\")"));
> +		else
> +			status_printf_ln(s, color,
> +				_("  (all conflicts fixed: run \"git revert --continue\")"));
> +	}
> +	if (advice_status_hints)
> +		status_printf_ln(s, color,
> +			_("  (use \"git revert --abort\" to cancel the revert operation)"));
Why not a single conditional? i.e.
	if (advice_status_hints) {
		if unmerged
			fix and continue
		else
			say continue
		you can also say abort
	}
Will queue on 'pu', with an straight-forward "SQUASH???" on top.
Thanks.
Previous: Matthieu MoyNext: Matthieu Moy
Message 5 of 6 in “bash: teach __git_ps1 about REVERT_HEAD”
  1. bash: teach __git_ps1 about REVERT_HEADRobin Rosenberg, Mar 31, 2013
  2. Junio C HamanoApr 1, 2013
  3. 1/2 status: show 'revert' state and status hintMatthieu Moy, Apr 2, 2013
  4. 2/2 status: show commit sha1 in "You are currently reverting" messageMatthieu Moy, Apr 2, 2013
  5. Junio C HamanoApr 2, 2013
  6. Matthieu MoyApr 2, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.