From: Junio C Hamano <gitster@pobox•com>
To: Tom Miller <jackerran@gmail•com>
Cc: git@vger•kernel.org
Subject: Re: [PATCH 3/3] fetch --prune: Repair branchname DF conflicts
Date: Thu, 19 Dec 2013 11:34:51 -0800 [thread overview]
Message-ID: <xmqq7gb0fxd0.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20131219014859.GA32240@gmail.com> (Tom Miller's message of "Wed, 18 Dec 2013 19:48:59 -0600")
Tom Miller <jackerran@gmail•com> writes:
>> But what should happen when we do not give --prune to "git fetch" in
>> such a situation? Should it fail, because we still have frotz/nitfol
>> and we cannot create frotz without losing it?
>
> You talk about this to some extent in an email from 2009. I have linked
> it below for your review.
> http://article.gmane.org/gmane.comp.version-control.git/132276
I do not think the old discussion talks about the case. It was
about "we have remotes/origin/{frotz,nitfol} from the origin from an
earlier fetch, the origin now has updated its frotz and deleted its
nitfol. 'git remote prune' removes our remotes/origin/nitfol
without updating our copy of remotes/origin/frotz, but I do not
think it is sensible. 'git fetch --prune origin' would update both
and make our remote-tracking branches for 'origin' in line with the
reality". It was not about what 'git fetch' without '--prune'
should do.
Your "'git fetch' without '--prune' should be less destrictive" is a
good guiding principle. If we have a copy of the 'frotz/nitfol'
branch from the 'origin', removing it so that we can have a new copy
of the 'frotz' branch the 'origin' now has (after it removed
'frotz/nitfol' to make room) is indeed an operation that loses
information. And it probably is the right thing to do to fail such
a fetch. 'git fetch --prune' on the other hand really means "I do
not care about the branches' histories my 'origin' discarded; bring
me up to date and give me the same view as my 'origin' has in my
remote-tracking branches", so losing 'frotz/nitfol', which the
'origin' already decided to discard, is what the user wants.
The atomicity issue Peff brings up is an interesting and important
one, but I think that is an orthogonal issue.
With the background information from the previous thread between you
and trast, the patch [3/3] looks good to me.
Thanks.
next prev parent reply other threads:[~2013-12-19 19:35 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-18 21:22 [PATCH 1/3] builtin/fetch.c: Add pretty_url() and print_url() Tom Miller
2013-12-18 21:22 ` [PATCH 2/3] fetch --prune: Always print header url Tom Miller
2013-12-18 21:22 ` [PATCH 3/3] fetch --prune: Repair branchname DF conflicts Tom Miller
2013-12-18 21:54 ` Junio C Hamano
2013-12-19 1:48 ` Tom Miller
2013-12-19 6:28 ` Junio C Hamano
2013-12-19 11:44 ` Jeff King
2013-12-19 19:34 ` Junio C Hamano [this message]
2013-12-18 21:47 ` [PATCH 1/3] builtin/fetch.c: Add pretty_url() and print_url() Junio C Hamano
2013-12-19 1:18 ` Tom Miller
2013-12-19 17:41 ` Thomas Miller
2013-12-19 22:57 ` [PATCH V2 1/2] fetch --prune: Always print header url Tom Miller
2013-12-19 22:57 ` [PATCH V2 2/2] fetch --prune: Run prune before fetching Tom 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=xmqq7gb0fxd0.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=jackerran@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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