Class CLIGitCommand


  • public class CLIGitCommand
    extends Main
    • Constructor Detail

      • CLIGitCommand

        public CLIGitCommand​(Repository db)
    • Method Detail

      • main

        public static void main​(String[] args)
                         throws Exception
        Executes git commands (with arguments) specified on the command line. The git repository (same for all commands) can be specified via system property "-Dgit_work_tree=path_to_work_tree". If the property is not set, current directory is used.
        Parameters:
        args - each element in the array must be a valid git command line, e.g. "git branch -h"
        Throws:
        Exception
      • openGitDir

        protected Repository openGitDir​(String aGitdir)
                                 throws IOException
        Description copied from class: Main
        Evaluate the --git-dir option and open the repository.
        Overrides:
        openGitDir in class Main
        Parameters:
        aGitdir - the --git-dir option given on the command line. May be null if it was not supplied.
        Returns:
        the repository to operate on.
        Throws:
        IOException - the repository cannot be opened.