Package org.eclipse.jgit.lib

Examples of org.eclipse.jgit.lib.BlobBasedConfig


      final TreeWalk tw = TreeWalk.forPath(db, GIT_MODULES, mergeTip.getTree());
      if (tw != null
          && (FileMode.REGULAR_FILE.equals(tw.getRawMode(0)) || FileMode.EXECUTABLE_FILE
              .equals(tw.getRawMode(0)))) {

        BlobBasedConfig bbc =
            new BlobBasedConfig(null, db, mergeTip, GIT_MODULES);

        final String thisServer = new URI(urlProvider.get()).getHost();

        final Branch.NameKey target =
            new Branch.NameKey(new Project.NameKey(destProject.getName()),
View Full Code Here


    byte [] blob = getByteContent(repository, tree, ".gitmodules", false);
    if (blob == null) {
      return list;
    }
    try {
      BlobBasedConfig config = new BlobBasedConfig(repository.getConfig(), blob);
      for (String module : config.getSubsections("submodule")) {
        String path = config.getString("submodule", module, "path");
        String url = config.getString("submodule", module, "url");
        list.add(new SubmoduleModel(module, path, url));
      }
    } catch (ConfigInvalidException e) {
      LOGGER.error("Failed to load .gitmodules file for " + repository.getDirectory(), e);
    }
View Full Code Here

    byte [] blob = getByteContent(repository, tree, ".gitmodules", false);
    if (blob == null) {
      return list;
    }
    try {
      BlobBasedConfig config = new BlobBasedConfig(repository.getConfig(), blob);
      for (String module : config.getSubsections("submodule")) {
        String path = config.getString("submodule", module, "path");
        String url = config.getString("submodule", module, "url");
        list.add(new SubmoduleModel(module, path, url));
      }
    } catch (ConfigInvalidException e) {
      LOGGER.error("Failed to load .gitmodules file for " + repository.getDirectory(), e);
    }
View Full Code Here

          configWalk.setRecursive(false);
          PathFilter filter = PathFilter.create(Constants.DOT_GIT_MODULES);
          configWalk.setFilter(filter);
          while (configWalk.next()) {
            if (filter.isDone(configWalk)) {
              modulesConfig = new BlobBasedConfig(null, repository,
                  configWalk.getObjectId(0));
              return this;
            }
          }
          modulesConfig = new Config();
View Full Code Here

    if (log == null)
      return;

    meta = new IpLogMeta();
    try {
      meta.loadFrom(new BlobBasedConfig(null, db, log.getObjectId(0)));
    } catch (ConfigInvalidException e) {
      throw new ConfigInvalidException(MessageFormat.format(IpLogText.get().configurationFileInCommitIsInvalid
          , log.getPathString(), commit.name()), e);
    }
View Full Code Here

          configWalk.setRecursive(false);
          PathFilter filter = PathFilter.create(Constants.DOT_GIT_MODULES);
          configWalk.setFilter(filter);
          while (configWalk.next()) {
            if (filter.isDone(configWalk)) {
              modulesConfig = new BlobBasedConfig(null, repository,
                  configWalk.getObjectId(0));
              return this;
            }
          }
          modulesConfig = new Config();
View Full Code Here

          configWalk.setRecursive(false);
          PathFilter filter = PathFilter.create(Constants.DOT_GIT_MODULES);
          configWalk.setFilter(filter);
          while (configWalk.next()) {
            if (filter.isDone(configWalk)) {
              modulesConfig = new BlobBasedConfig(null, repository,
                  configWalk.getObjectId(0));
              return this;
            }
          }
          modulesConfig = new Config();
View Full Code Here

TOP

Related Classes of org.eclipse.jgit.lib.BlobBasedConfig

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.