git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Subject: Re: [PATCH] add -u: do not fail to resolve a path as deleted
Date: Wed, 28 Jan 2009 15:32:53 -0800	[thread overview]
Message-ID: <7viqnzj9ay.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <7vbptrkqvb.fsf@gitster.siamese.dyndns.org> (Junio C. Hamano's message of "Wed, 28 Jan 2009 14:28:08 -0800")

Junio C Hamano <gitster@pobox.com> writes:

> After you resolve a conflicted merge to remove the path, "git add -u"
> failed to record the removal.  Instead it errored out by saying that the
> removed path is not found in the work tree, but that is what the user
> wanted to do and failing it is illogical.
>
> This fixes it.
>
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
> ---
>  read-cache.c          |    5 +++++
>  t/t2200-add-update.sh |   20 +++++++++++++++++++-
>  2 files changed, 24 insertions(+), 1 deletions(-)
>
> diff --git a/read-cache.c b/read-cache.c
> index b1475ff..ddc0586 100644
> --- a/read-cache.c
> +++ b/read-cache.c
> @@ -1574,6 +1574,11 @@ static void update_callback(struct diff_queue_struct *q,
>  		default:
>  			die("unexpected diff status %c", p->status);
>  		case DIFF_STATUS_UNMERGED:
> +			/*
> +			 * diff-files gives U followed by the work tree state
> +			 * such as M or D, so we can ignore this.
> +			 */
> +			continue;

This is wrong; breaks t3702.

  reply	other threads:[~2009-01-28 23:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-28 22:28 [PATCH] add -u: do not fail to resolve a path as deleted Junio C Hamano
2009-01-28 23:32 ` Junio C Hamano [this message]
2009-01-29  0:13   ` 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=7viqnzj9ay.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --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).