示例#1
0
 /** @see GitCommand#execute() */
 @Override
 public Void execute() throws GitException {
   remote = remote == null ? "origin" : remote;
   reset();
   commandLine.add("pull");
   if (remote != null) {
     commandLine.add(remote);
   }
   if (refSpec != null) {
     commandLine.add(refSpec);
   }
   if (author != null) {
     setCommandEnvironment("GIT_AUTHOR_NAME", author.getName());
     setCommandEnvironment("GIT_AUTHOR_EMAIL", author.getEmail());
     setCommandEnvironment("GIT_COMMITTER_NAME", author.getName());
     setCommandEnvironment("GIT_COMMITTER_EMAIL", author.getEmail());
   }
   start();
   pullResponse = newDto(PullResponse.class).withCommandOutput(Joiner.on("\n").join(lines));
   return null;
 }