[JGIT PATCH] Allow jgit to load additional user classes

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[JGIT PATCH] Allow jgit to load additional user classes

Shawn Pearce
Users may want to develop their own custom programs (implementations
of TextBuiltin) and add them into the jgit runtime for command line
usage.  We now load additional classes from $JGIT_CLASSPATH, if it
was defined when the process started.

To avoid users replacing our own internal commands or classes we
put the user classpath behind our own, ensuring all of our standard
classes and resources are found first.

Signed-off-by: Shawn O. Pearce <[hidden email]>
 jgit.sh |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/jgit.sh b/jgit.sh
index 121beec..6b9b224 100755
--- a/jgit.sh
+++ b/jgit.sh
@@ -15,6 +15,11 @@ else
+if [ -n "$JGIT_CLASSPATH" ]
+ cp="$cp:$JGIT_CLASSPATH"
 # Cleanup paths for Cygwin.
 case "`uname`" in

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [hidden email]
More majordomo info at  http://vger.kernel.org/majordomo-info.html