git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robin Rosenberg <robin.rosenberg@dewire.com>
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: git@vger.kernel.org
Subject: Re: [JGIT PATCH 2/2] Add support for remote.name.pushurl
Date: Sun, 21 Jun 2009 19:30:43 +0200	[thread overview]
Message-ID: <200906211930.43809.robin.rosenberg@dewire.com> (raw)
In-Reply-To: <1245547316-10299-2-git-send-email-spearce@spearce.org>

söndag 21 juni 2009 03:21:56 skrev "Shawn O. Pearce" <spearce@spearce.org>:
> In C Git commit 203462347fce Michael J Gruber added support for a
> new URL key within a remote block, permitting a different URL to
> be used for push than for fetch.  In the commit message he cites
> an example where fetch runs over git://, but push uses ssh://,
> as the git:// protocol has lower connection setup overheads.
> 
> This change complicates the Transport API as now we must know
> in advance when the Transport.open() call is made what type of
> operation the caller wants to perform, so we know which config
> key to honor when constructing the Transport objects.
> 
> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
> ---
>  .../src/org/spearce/jgit/pgm/Push.java             |    3 +-
>  .../org/spearce/jgit/transport/RemoteConfig.java   |   47 ++++++
>  .../src/org/spearce/jgit/transport/Transport.java  |  150 ++++++++++++++++++--
>  3 files changed, 190 insertions(+), 10 deletions(-)
> 
> diff --git a/org.spearce.jgit.pgm/src/org/spearce/jgit/pgm/Push.java b/org.spearce.jgit.pgm/src/org/spearce/jgit/pgm/Push.java
> index 19d31a1..9364e4a 100644
> --- a/org.spearce.jgit.pgm/src/org/spearce/jgit/pgm/Push.java
> +++ b/org.spearce.jgit.pgm/src/org/spearce/jgit/pgm/Push.java
> @@ -102,7 +102,8 @@ protected void run() throws Exception {
>  				refSpecs.add(spec.setForceUpdate(true));
>  		}
>  
> -		final List<Transport> transports = Transport.openAll(db, remote);
> +		final List<Transport> transports;
> +		transports = Transport.openAll(db, remote, Transport.Operation.PUSH);

Nit-pick. We usually initialize in one statement. I'll squash that for you.

Seems we need to consider the Eclipse UI, since that has only of only one UI. Can we hold on to
that or at least establish a related issue in the bug tracker for Egit.

-- robin

  reply	other threads:[~2009-06-21 17:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-21  1:21 [JGIT PATCH 1/2] Cleanup Transport.applyConfig to use setter methods more consistently Shawn O. Pearce
2009-06-21  1:21 ` [JGIT PATCH 2/2] Add support for remote.name.pushurl Shawn O. Pearce
2009-06-21 17:30   ` Robin Rosenberg [this message]
2009-06-23 16:50     ` Shawn O. Pearce

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=200906211930.43809.robin.rosenberg@dewire.com \
    --to=robin.rosenberg@dewire.com \
    --cc=git@vger.kernel.org \
    --cc=spearce@spearce.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).