From: James Denholm <nod.helm@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Kevin Cagle <kcagle@micron.com>
Subject: Re: [PATCH v2] contrib/subtree bugfix: Can't `add` annotated tag
Date: Wed, 14 May 2014 22:50:01 +0000 [thread overview]
Message-ID: <20140514225001.GA5850@debian> (raw)
In-Reply-To: <xmqqtx8shwel.fsf@gitster.dls.corp.google.com>
Junio C Hamano wrote:
> To me, it looks like all that is necessary is to accept your patch
> but with a three-byte tightening to detect such a pathological case
> and signal an error, which is what " &&", which I added to your new
> line that sets revp=$(peel_committish ...), is about.
>
> This patch, with or without these extra " &&" three bytes, will not
> be part of the upcoming 2.0 release anyway, so we have enough time
> to iron it out.
Ah, right, sorry, somehow I missed the " &&" in the amended patch. I
don't know how I overlooked that. That indeed would be plenty.
> Sorry, I am lost. What would be a problem exactly?
>
> A FETCH_HEAD can be pointing at an object that is not committish,
> and users involved, both at the originating end who controls the
> repository you fetched from and at the receiving end who wanted to
> fetch the object, are *not* expeting to be able to make a merge of
> such an object anyway. My suggestion was not to ask you to come up
> with a sane behaviour when the user told us to add a single blob
> with "subtree add"; it was merely to detect such unintended use as
> an error.
Yeah, what I meant by problem was the possibility of finding a way to
pre-empt the case of a tag pointing to a blob and handle it as
gracefully as possible, and try to leave the user with their working
tree in the state from before the subtree call.
The reason I'd suggest it might be worth handling at some point is that
(in the far flung future) it may not be out of the scope of subtree to
pull not only other repos to a local subtree, but also specific trees
(or perhaps blobs) to a local subtree. Conceptually, I'd argue that a
sensible future functionality in order to allow subtree users to deal
with upstreams that don't split their projects up sanely (cough splutter
Facebook's internal). Hence, working out a way to determine tag types,
possibly before doing the fetch somehow, would be a boon to that
methinks.
Of course, this is something I haven't yet thought enough about and the
idea is likely full of holes, but hey, I'm nothing if not impractically
idealist.
---
Regards,
James Denholm.
prev parent reply other threads:[~2014-05-14 22:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-13 4:08 [PATCH v2] contrib/subtree bugfix: Can't `add` annotated tag James Denholm
2014-05-13 19:34 ` Junio C Hamano
2014-05-13 23:02 ` James Denholm
2014-05-13 23:12 ` Junio C Hamano
2014-05-14 21:32 ` James Denholm
2014-05-14 21:40 ` Junio C Hamano
2014-05-14 22:50 ` James Denholm [this message]
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=20140514225001.GA5850@debian \
--to=nod.helm@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=kcagle@micron.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).