git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: bug in git-revert
Date: Sun, 2 Mar 2008 02:02:21 -0500	[thread overview]
Message-ID: <20080302070221.GA10629@coredump.intra.peff.net> (raw)
In-Reply-To: <20080302064449.GA6334@coredump.intra.peff.net>

On Sun, Mar 02, 2008 at 01:44:49AM -0500, Jeff King wrote:

> --- a/builtin-revert.c
> +++ b/builtin-revert.c
> @@ -279,6 +279,8 @@ static int revert_or_cherry_pick(int argc, const char **argv)
>  		if (get_sha1("HEAD", head))
>  			die ("You do not have a valid HEAD");
>  		wt_status_prepare(&s);
> +		s.fp = NULL;
> +		wt_status_print_updated(&s);
>  		if (s.commitable)
>  			die ("Dirty index: cannot %s", me);
>  		discard_cache();

Actually, this isn't right. It needs to call wt_status_print(&s), since
it does some magic that wt_status_print_updated() requires to run
correctly.

-Peff

  parent reply	other threads:[~2008-03-02  7:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-02  6:44 bug in git-revert Jeff King
2008-03-02  7:00 ` Johannes Schindelin
2008-03-02  7:02 ` Jeff King [this message]
2008-03-02  7:22 ` [PATCH] revert: actually check for a dirty index Jeff King
2008-03-02 10:37   ` Alex Riesen
2008-03-03  6:30     ` Jeff King
2008-03-03  7:11       ` Junio C Hamano

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=20080302070221.GA10629@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.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).