git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Mike Hommey <mh@glandium.org>
Cc: git@vger.kernel.org
Subject: Re: [RFC PATCH 3/3] connect: move ssh command line preparation to a separate (public) function
Date: Fri, 29 Apr 2016 09:58:37 -0700	[thread overview]
Message-ID: <xmqqa8kc1hdu.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <1461890625-23222-3-git-send-email-mh@glandium.org> (Mike Hommey's message of "Fri, 29 Apr 2016 09:43:45 +0900")

Mike Hommey <mh@glandium.org> writes:

> Signed-off-by: Mike Hommey <mh@glandium.org>
> ---

I think moving it out into a separate helper function is a very good
change to make the end result easier to follow.

Turning the helper to extern and adding it to connect.h does not
benefit us (and [PATCH 1/3] doesn't, either).

And in the longer term, I doubt think it (and [PATCH 1/3]) would
benefit you, either.  We do not mean to make what goes into libgit.a
(which connect.o is a part of) be a stable "library interface", so
all sorts of future changes we make would affect your external code,
e.g.

 - some people periodically check for extern symbols that do not
   have to be extern, and this will be marked static again any time
   (or you somehow need to arrange it so that this function is
   marked as special to reduce false positives);

 - we may need to update the external interface to this function,
   changing parameters, or updating its return value.

even if we promise not to make such a change only for the purpose of
deliberately breaking you.  So you have to be prepared and willing
to follow the evolution of in-core code anyway.

So I would suggest restructuring this series to do

 * 2/3 (DIAG consolidation)
 * refactoring in 3/3 but not s/static/extern/

and in optional follow(s)-up, do

 * s/static/extern/ and update to *.h in 3/3

 * 1/3, but I do not think it is necessary for users of
   prepare_ssh_command()

The last patch could be kept in your fork of git.git if you want to
keep linking with libgit.a, but my feeling is that we'd prefer to do
without it at least for now, until we gain in-tree users that live
outside connect.c that want to call the helper.


Thanks.

      reply	other threads:[~2016-04-29 16:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-28 14:12 [RFC PATCH 0/4] git_connect: add some flexibility Mike Hommey
2016-04-28 14:12 ` [PATCH 1/4] git_connect: extend to take a pseudo format string for the program to run Mike Hommey
2016-04-28 14:12 ` [PATCH 2/4] git_connect: avoid quoting the path on the command line when it's not necessary Mike Hommey
2016-04-28 16:14   ` Stefan Beller
2016-04-28 14:12 ` [PATCH 3/4] git_connect: allow a file descriptor to be allocated for stderr Mike Hommey
2016-04-28 14:12 ` [PATCH 4/4] git_connect: add a flag to consider the path part of ssh urls relative Mike Hommey
2016-04-28 17:41 ` [RFC PATCH 0/4] git_connect: add some flexibility Junio C Hamano
2016-04-28 23:29   ` Mike Hommey
2016-04-29  0:43     ` [RFC PATCH 1/3] connect: make parse_connect_url public Mike Hommey
2016-04-29  0:43       ` [RFC PATCH 2/3] connect: group CONNECT_DIAG_URL handling code Mike Hommey
2016-04-29 15:59         ` Junio C Hamano
2016-04-29 17:13           ` Junio C Hamano
2016-04-29 20:00         ` Torsten Bögershausen
2016-04-29  0:43       ` [RFC PATCH 3/3] connect: move ssh command line preparation to a separate (public) function Mike Hommey
2016-04-29 16:58         ` Junio C Hamano [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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqa8kc1hdu.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).