Class GitCommandLineUtils

java.lang.Object
org.apache.maven.scm.provider.git.gitexe.command.GitCommandLineUtils

public final class GitCommandLineUtils extends Object
Command line construction utility.
Author:
Brett Porter, Mark Struberg
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    addTarget(org.codehaus.plexus.util.cli.Commandline cl, List<File> files)
     
    static int
    execute(org.codehaus.plexus.util.cli.Commandline cl, org.codehaus.plexus.util.cli.CommandLineUtils.StringStreamConsumer stdout, org.codehaus.plexus.util.cli.CommandLineUtils.StringStreamConsumer stderr)
     
    static int
    execute(org.codehaus.plexus.util.cli.Commandline cl, org.codehaus.plexus.util.cli.StreamConsumer consumer, org.codehaus.plexus.util.cli.CommandLineUtils.StringStreamConsumer stderr)
     
    static org.codehaus.plexus.util.cli.Commandline
    getBaseGitCommandLine(File workingDirectory, String command)
    Use this only for commands not requiring environment variables (i.e.
    static org.codehaus.plexus.util.cli.Commandline
    getBaseGitCommandLine(File workingDirectory, String command, GitScmProviderRepository repository, Map<String,String> environment)
    Use this for commands requiring environment variables (i.e.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Method Details

    • addTarget

      public static void addTarget(org.codehaus.plexus.util.cli.Commandline cl, List<File> files)
    • getBaseGitCommandLine

      public static org.codehaus.plexus.util.cli.Commandline getBaseGitCommandLine(File workingDirectory, String command)
      Use this only for commands not requiring environment variables (i.e. local commands).
      Parameters:
      workingDirectory -
      command -
      Returns:
      TODO
    • getBaseGitCommandLine

      public static org.codehaus.plexus.util.cli.Commandline getBaseGitCommandLine(File workingDirectory, String command, GitScmProviderRepository repository, Map<String,String> environment)
      Use this for commands requiring environment variables (i.e. remote commands).
      Parameters:
      workingDirectory -
      command -
      environment -
      Returns:
      TODO
    • execute

      public static int execute(org.codehaus.plexus.util.cli.Commandline cl, org.codehaus.plexus.util.cli.StreamConsumer consumer, org.codehaus.plexus.util.cli.CommandLineUtils.StringStreamConsumer stderr) throws ScmException
      Throws:
      ScmException
    • execute

      public static int execute(org.codehaus.plexus.util.cli.Commandline cl, org.codehaus.plexus.util.cli.CommandLineUtils.StringStreamConsumer stdout, org.codehaus.plexus.util.cli.CommandLineUtils.StringStreamConsumer stderr) throws ScmException
      Throws:
      ScmException