Examples of addFilepattern()


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

    AddCommand addCommand = git.add();

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

      addCommand.call();
    }
View Full Code Here

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

      return;
    AddCommand addCommand = new Git(repo).add();
    boolean fileAdded = false;
    for (String path : notTracked)
      if (commitFileList.contains(path)) {
        addCommand.addFilepattern(path);
        fileAdded = true;
      }
    if (fileAdded)
      try {
        addCommand.call();
View Full Code Here

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

    if (!addPaths.isEmpty())
      try {
        AddCommand add = git.add();
        for (String addPath : addPaths)
          add.addFilepattern(addPath);
        add.call();
      } catch (NoFilepatternException e1) {
        // cannot happen
      } catch (JGitInternalException e1) {
        Activator.handleError(e1.getCause().getMessage(),
View Full Code Here

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

    return new Action(UIText.CommitDialog_AddFileOnDiskToIndex) {
      public void run() {
        AddCommand addCommand = new Git(repository).add();
        for (Iterator<?> it = selection.iterator(); it.hasNext();) {
          CommitItem commitItem = (CommitItem) it.next();
          addCommand.addFilepattern(commitItem.path);
        }
        try {
          addCommand.call();
        } catch (Exception e) {
          Activator.logError(UIText.CommitDialog_ErrorAddingFiles, e);
View Full Code Here

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

      addCommands.put(map, command);
    }
    String filepattern = map.getRepoRelativePath(resource);
    if ("".equals(filepattern)) //$NON-NLS-1$
      filepattern = "."; //$NON-NLS-1$
    command.addFilepattern(filepattern);
  }

}
View Full Code Here

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

        repoRelativepath = "."; //$NON-NLS-1$
      else
        repoRelativepath = path.removeFirstSegments(
                path.matchingFirstSegments(workTreePath))
            .setDevice(null).toString();
      addCommand.addFilepattern(repoRelativepath);
    }
    try {
      addCommand.call();
    } catch (GitAPIException e) {
      Activator.logError(UIText.AddToIndexCommand_addingFilesFailed,
View Full Code Here

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

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

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

    Repository repository = getRepository(fileVersions[0].getFile());
    Git git = new Git(repository);
    try {
      AddCommand adder = git.add();
      for (FileVersion fileVersion : fileVersions) {
        adder.addFilepattern(getPath(fileVersion.getFile(), repository));
      }
      adder.call();
      commit(git, String.format("[FitNesse] Updated files: %s.", formatFileVersions(fileVersions)), fileVersions[0].getAuthor());
    } catch (GitAPIException e) {
      throw new IOException("Unable to commit changes", e);
View Full Code Here

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

      AddCommand addCommand = git.add();

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

        addCommand.call();
      }
View Full Code Here

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

      final AddCommand add = git.add();
      for (final File f : dir.listFiles()) {
        final String name = f.getName();
        if (!".git".equals(name)) {
          log("adding %s", name);
          add.addFilepattern(name);
        }
      }
      final DirCache index = add.call();
      final int cnt = index.getEntryCount();
      log("%d entries added", cnt);
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.