Package org.eclipse.jgit.api

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


      for (String file : allFiles) {
        String toAdd = translateFilePathUsingPrefix(file, prefix);
        log("Adding " + toAdd, Project.MSG_VERBOSE);
        gitAdd.addFilepattern(toAdd);
      }
      gitAdd.call();
    } catch (Exception e) {
      throw new BuildException("Could not add files to index." + src, e);
    }

  }
View Full Code Here


                    {
                        getLogger().debug( "add manualy: " + changed );
                        add.addFilepattern( changed );
                        doCommit = true;
                    }
                    add.call();
                }
            }

            List<ScmFile> checkedInFiles = Collections.emptyList();
            if ( doCommit )
View Full Code Here

      for (String s : status.getUntracked()) {
        log("Adding file %s", s);
        addCommand.addFilepattern(s);
      }

      addCommand.call();
    }

    log("Committing");

    try {
View Full Code Here

        for (String s : status.getUntracked()) {
          getLog().info("Adding file " + s);
          addCommand.addFilepattern(s);
        }

        addCommand.call();
      }

      git.commit().setAll(true).setMessage(versionDescription).call();

      masterRef = git.getRepository()
View Full Code Here

        for (String s : status.getUntracked()) {
          getLog().info("Adding file " + s);
          addCommand.addFilepattern(s);
        }

        addCommand.call();
      }

      git.commit().setAll(true).setMessage(versionDescription).call();

      masterRef = git.getRepository()
View Full Code Here

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

                String path = relativize( baseUri, file );
                add.addFilepattern( path );
                add.addFilepattern( file.getAbsolutePath() );
            }
        }
        add.call();
       
        Status status = git.status().call();

        Set<String> allInIndex = new HashSet<String>();
        allInIndex.addAll( status.getAdded() );
View Full Code Here

                    {
                        getLogger().debug( "add manualy: " + changed );
                        add.addFilepattern( changed );
                        doCommit = true;
                    }
                    add.call();
                }
            }

            List<ScmFile> checkedInFiles = Collections.emptyList();
            if ( doCommit )
View Full Code Here

      for (String file : allFiles) {
        String toAdd = translateFilePathUsingPrefix(file, prefix);
        log("Adding " + toAdd, Project.MSG_VERBOSE);
        gitAdd.addFilepattern(toAdd);
      }
      gitAdd.call();
    } catch (Exception e) {
      throw new BuildException("Could not add files to index." + src, e);
    }

  }
View Full Code Here

  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

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.