Package org.eclipse.jgit.pgm

Examples of org.eclipse.jgit.pgm.TextBuiltin


            throw new Die(true);
        }

        gitdir = new File(rootDir, gitdir).getPath();

        final TextBuiltin cmd = subcommand;
//        cmd.ins = in;
//        cmd.outs = out;
//        cmd.errs = err;
//        if (cmd.requiresRepository())
//            cmd.init(openGitDir(gitdir), null);
//        else
//            cmd.init(null, gitdir);
//        try {
//            cmd.execute(arguments.toArray(new String[arguments.size()]));
//        } finally {
//            if (cmd.outw != null)
//                cmd.outw.flush();
//            if (cmd.errw != null)
//                cmd.errw.flush();
//        }
        set(cmd, "ins", in);
        set(cmd, "outs", out);
        set(cmd, "errs", err);
        if ((Boolean) call(cmd, "requiresRepository")) {
            call(cmd, "init", new Class[] { Repository.class, String.class }, new Object[] { openGitDir(gitdir), gitdir });
        } else {
            call(cmd, "init", new Class[] { Repository.class, String.class }, new Object[] { null, gitdir });
        }
        try {
            cmd.execute(arguments.toArray(new String[arguments.size()]));
        } finally {
            if (get(cmd, "outw") != null)
                ((ThrowingPrintWriter) get(cmd, "outw")).flush();
            if (get(cmd, "errw") != null)
                ((ThrowingPrintWriter) get(cmd, "errw")).flush();
View Full Code Here

TOP

Related Classes of org.eclipse.jgit.pgm.TextBuiltin

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.