Package org.eclipse.jgit.api

Examples of org.eclipse.jgit.api.AddCommand.addFilepattern()


  @Override
  protected void run() throws Exception {
    AddCommand addCmd = new Git(db).add();
    addCmd.setUpdate(update);
    for (String p : filepatterns)
      addCmd.addFilepattern(p);
    addCmd.call();
  }
}
View Full Code Here


    }

    Git git = new Git(db);
    AddCommand add = git.add();
    for (int i = 0; i < paths.length(); i++) {
      add.addFilepattern(paths.getString(i));
    }
    // "git add {pattern}"
    try {
      add.call();
    } catch (GitAPIException e) {
View Full Code Here

    // TODO: we're calling "add" twice, this is inefficient, see bug 349299
    // "git add -u {pattern}"
    add = git.add().setUpdate(true);
    for (int i = 0; i < paths.length(); i++) {
      add.addFilepattern(paths.getString(i));
    }
    try {
      add.call();
    } catch (GitAPIException e) {
      return statusHandler.handleRequest(request, response, new ServerStatus(IStatus.ERROR, HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.getMessage(),
View Full Code Here

            }

            if ( file.exists() )
            {
                String path = relativize( baseUri, file );
                add.addFilepattern( path );
                add.addFilepattern( file.getAbsolutePath() );
            }
        }
        add.call();
       
View Full Code Here

            if ( file.exists() )
            {
                String path = relativize( baseUri, file );
                add.addFilepattern( path );
                add.addFilepattern( file.getAbsolutePath() );
            }
        }
        add.call();
       
        Status status = git.status().call();
View Full Code Here

                {
                    AddCommand add = git.add();
                    for ( String changed : changeds )
                    {
                        getLogger().debug( "add manualy: " + changed );
                        add.addFilepattern( changed );
                        doCommit = true;
                    }
                    add.call();
                }
            }
View Full Code Here

      File myfile = new File(dir1, name);
      FileOutputStream os = new FileOutputStream(myfile);
      os.write(data);
      os.close();
      AddCommand add = git.add();
      add.addFilepattern(filePath).call();
      GitUser user = userMap.get(psoft_user);
      if (user == null)
        user = userMap.get("default");
      CommitCommand commit = git.commit();
      commit.setMessage(commitStr).setAuthor(user.user, user.email).setCommitter("Decode Peoplecode", "nobody@dummy.org").call();
View Full Code Here

 
  private void addAndCommit(Repository r, String filePattern, String msg) throws IOException{
        try {
            Git git = new Git(r);
            AddCommand cmd = git.add();
            cmd.addFilepattern(filePattern);
            cmd.call();

            CommitCommand co = git.commit();
            co.setAuthor("Jenkow","noreply@jenkins-ci.org");
            co.setMessage(msg);
View Full Code Here

                    if(isWindows)
                    {
                        pomPath = StringUtils.replace(pomPath,"\\","/");   
                    }
                   
                    add.addFilepattern(pomPath);
                }
                add.call();
                git.commit().setMessage(message).call();
            }
        }
View Full Code Here

                    if (getLogger().isDebugEnabled())
                    {
                        getLogger().debug("adding file pattern for poms commit: " + pomPath);
                    }
                    add.addFilepattern(pomPath);
                }
                add.call();
                git.commit().setMessage(message).call();
            }
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.