git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Rast <tr@thomasrast.ch>
To: Tom Miller <jackerran@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH/WIP] Repair DF conflicts during fetch.
Date: Fri, 29 Nov 2013 20:07:02 +0100	[thread overview]
Message-ID: <871u1zf2nd.fsf@thomasrast.ch> (raw)
In-Reply-To: <1385747858-29343-2-git-send-email-jackerran@gmail.com> (Tom Miller's message of "Fri, 29 Nov 2013 11:57:38 -0600")

Tom Miller <jackerran@gmail.com> writes:

> When a DF conflict occurs during a fetch, --prune should be able to fix
> it. When fetching with --prune, the fetching process happens before
> pruning causing the DF conflict to persist and report an error. This
> patch prunes before fetching, thus correcting DF conflicts during a
> fetch.
>
> Signed-off-by: Tom Miller <jackerran@gmail.com>
> ---
>  builtin/fetch.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)

Good catch.

I can't comment on the correctness of the patch right now, but here's a
test you could steal.  It just reproduces what you describe, and I did
verify that it confirms the fix ;-)

diff --git i/t/t5510-fetch.sh w/t/t5510-fetch.sh
index 5d4581d..a981125 100755
--- i/t/t5510-fetch.sh
+++ w/t/t5510-fetch.sh
@@ -614,4 +614,18 @@ test_expect_success 'all boundary commits are excluded' '
 	test_bundle_object_count .git/objects/pack/pack-${pack##pack	}.pack 3
 '
 
+test_expect_success 'branchname D/F conflict resolved by --prune' '
+	git branch dir/file &&
+	git clone . prune-df-conflict &&
+	git branch -D dir/file &&
+	git branch dir &&
+	(
+		cd prune-df-conflict &&
+		git fetch --prune &&
+		git rev-parse origin/dir >../actual
+	) &&
+	git rev-parse dir >expect &&
+	test_cmp expect actual
+'
+
 test_done


-- 
Thomas Rast
tr@thomasrast.ch

  reply	other threads:[~2013-11-29 19:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-29 17:57 [PATCH/WIP] Repair DF conflicts during fetch Tom Miller
2013-11-29 17:57 ` Tom Miller
2013-11-29 19:07   ` Thomas Rast [this message]
2013-12-01 15:03     ` Thomas Miller

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=871u1zf2nd.fsf@thomasrast.ch \
    --to=tr@thomasrast.ch \
    --cc=git@vger.kernel.org \
    --cc=jackerran@gmail.com \
    /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).