git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: Mike Hommey <mh@glandium.org>,
	git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: Announcing a new (prototype) git-remote-hg tool
Date: Fri, 5 Dec 2014 17:59:30 -0500	[thread overview]
Message-ID: <20141205225930.GA29256@peff.net> (raw)
In-Reply-To: <20141205221319.GK16345@google.com>

On Fri, Dec 05, 2014 at 02:13:19PM -0800, Jonathan Nieder wrote:

> Mike Hommey wrote:
> 
> > I'm currently evaluating what the final tool would look like. I'm *very*
> > tempted to implement it in C, based on core git code, because there are
> > many things that this helper does that would be so much easier to do
> > with direct access to git's guts. And that wouldn't require more
> > dependencies than git currently has: it would "just" need curl and ssh,
> > and git already uses both.
> >
> > If I were to go in that direction, would you consider integrating it
> > in git core?
> 
> Yes --- I would like this a lot.

I'm concerned that this tool will have drawbacks that Felipe's remote-hg
does not. And I can well imagine that it may, as that tool builds on
Mercurial's API, which will probably handle some corner cases
differently. This isn't to disparage Mike's attempt; it will probably
have some upsides, too. But given that the approaches are so different,
it does not seem obvious to me that one will always be better than the
other.

One of the nice things about spinning remote-hg out of the core repo is
that it means we do not have to endorse a particular implementation, and
they can compete with each other on their merits.  I would very much
hate to see Felipe's remote-hg project wither and die just because
another implementation becomes the de facto standard by being included
in git.git. It's a proven tool, and this new thing is not yet.

It's a shame that both squat on the name "remote-hg", because it makes
it difficult to tell the two apart. But of course that is the only way
to make "git clone hg::..." work. Maybe we need a layer of indirection?
:)

>  - libgit.a in its current state evolves too quickly for it to be
>    convenient for out-of-tree tools to use.  cgit <http://git.zx2c4.com/cgit/>
>    uses git pinned to a particular version as a submodule to get around
>    this, which is fussy and has bad implications for remembering to
>    get security updates.

I'm not sure that this approach is any better than carrying something in
contrib/ in git.git. If I refactor a function in libgit.a, I notice
breakage in the callers because it no longer compiles, or because I am
thorough and look at the implications to git callers.

I do _not_ want to be responsible for making sure that contrib/* still
builds. That is the problem of the maintainer of the contrib/ project in
question. That may sound a little selfish, but I think that is what it
means to be in contrib, and not in the regular tree.

So once you realize that is the burden of the contrib/ author to fix
breakages, then the process is:

  git pull
  cd contrib/c-remote-hg
  make
  # oops, it broke
  fix fix fix

That is not any different than:

  git submodule add git...
  git submodule update
  make
  # oops, it broke
  fix fix fix

The hard part is not how you pull changes from the new git into your
tree. It is the fact that upstream may be breaking the interface behind
your back.  And your best bet is to aggressively merge with upstream,
rather than trying to track only occasional release versions.

Of course, if you meant to _really_ carry it in-tree, not in contrib/,
then none of that applies. But then I worry doubly about the
"endorsement" issue.

-Peff

  reply	other threads:[~2014-12-05 22:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-05 20:53 Announcing a new (prototype) git-remote-hg tool Mike Hommey
2014-12-05 22:13 ` Jonathan Nieder
2014-12-05 22:59   ` Jeff King [this message]
2014-12-05 23:13     ` Jonathan Nieder
2014-12-05 23:46       ` Mike Hommey
2014-12-06  5:06       ` Jeff King
2014-12-05 23:31     ` Mike Hommey
2014-12-05 22:44 ` Philip Oakley
2015-02-11  9:32 ` Announcing git-cinnabar 0.1.0 (Was: Announcing a new (prototype) git-remote-hg tool) Mike Hommey

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=20141205225930.GA29256@peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@gmail.com \
    --cc=mh@glandium.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).