git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: Robin Rosenberg <robin.rosenberg@dewire.com>
Cc: git@vger.kernel.org
Subject: [JGIT PATCH 2/2] Correct Javadoc comment for TransportLocal about forking
Date: Sat,  2 May 2009 13:30:30 -0700	[thread overview]
Message-ID: <1241296230-19342-2-git-send-email-spearce@spearce.org> (raw)
In-Reply-To: <1241296230-19342-1-git-send-email-spearce@spearce.org>

Since a4548aedff ("Switch local fetch connection to use our own
UploadPack") this code has tried to avoid forking to execute the
CGit upload-pack or receive-pack processes, instead favoring the
creation of a helper thread and performing all work through a shared
memory buffer within the same JVM.

Update the Javadoc to better reflect what this class does.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
---
 .../org/spearce/jgit/transport/TransportLocal.java |   24 +++++++++++++++----
 1 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/org.spearce.jgit/src/org/spearce/jgit/transport/TransportLocal.java b/org.spearce.jgit/src/org/spearce/jgit/transport/TransportLocal.java
index d5a6c14..230ab76 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/transport/TransportLocal.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/transport/TransportLocal.java
@@ -52,13 +52,27 @@
 import org.spearce.jgit.util.FS;
 
 /**
- * Transport that executes the Git "remote side" processes on a local directory.
+ * Transport to access a local directory as though it were a remote peer.
  * <p>
  * This transport is suitable for use on the local system, where the caller has
- * direct read or write access to the remote repository. This implementation
- * forks a C Git process to provide the remote side access, much as the
- * {@link TransportGitSsh} implementation causes the remote side to run a C Git
- * process.
+ * direct read or write access to the "remote" repository.
+ * <p>
+ * By default this transport works by spawning a helper thread within the same
+ * JVM, and processes the data transfer using a shared memory buffer between the
+ * calling thread and the helper thread. This is a pure-Java implementation
+ * which does not require forking an external process.
+ * <p>
+ * However, during {@link #openFetch()}, if the Transport has configured
+ * {@link Transport#getOptionUploadPack()} to be anything other than
+ * <code>"git-upload-pack"</code> or <code>"git upload-pack"</code>, this
+ * implementation will fork and execute the external process, using an operating
+ * system pipe to transfer data.
+ * <p>
+ * However, during {@link #openPush()}, if the Transport has configured
+ * {@link Transport#getOptionReceivePack()} to be anything other than
+ * <code>"git-receive-pack"</code> or <code>"git receive-pack"</code>, this
+ * implementation will fork and execute the external process, using an operating
+ * system pipe to transfer data.
  */
 class TransportLocal extends Transport implements PackTransport {
 	private static final String PWD = ".";
-- 
1.6.3.rc3.212.g8c698

  reply	other threads:[~2009-05-02 20:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-02 20:30 [JGIT PATCH 1/2] Ensure that a PackFile instance stays invalid when overwritten Shawn O. Pearce
2009-05-02 20:30 ` Shawn O. Pearce [this message]
2009-05-03  7:52   ` [JGIT PATCH 2/2] Correct Javadoc comment for TransportLocal about forking Robin Rosenberg
2009-05-04 13:57     ` Shawn O. Pearce
2009-05-03  8:05 ` [JGIT PATCH 1/2] Ensure that a PackFile instance stays invalid when overwritten Robin Rosenberg
2009-05-04 19:30   ` [JGIT PATCH v2 " 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=1241296230-19342-2-git-send-email-spearce@spearce.org \
    --to=spearce@spearce.org \
    --cc=git@vger.kernel.org \
    --cc=robin.rosenberg@dewire.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).