Codota Logo
org.eclipse.jgit.internal.submodule
Code IndexAdd Codota to your IDE (free)

How to use org.eclipse.jgit.internal.submodule

Best Java code snippets using org.eclipse.jgit.internal.submodule (Showing top 14 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew LinkedList()
  • Codota IconCollections.emptyList()
  • Codota Iconnew ArrayList()
  • Smart code suggestions by Codota
}
origin: org.eclipse.jgit/org.eclipse.jgit

/**
 * Validate path for a submodule
 *
 * @param path
 *            path of a submodule
 * @throws SubmoduleValidationException
 *             path doesn't look right
 */
public static void assertValidSubmodulePath(String path)
    throws SubmoduleValidationException {
  if (path.startsWith("-")) { //$NON-NLS-1$
    throw new SubmoduleValidationException(
        MessageFormat.format(
            JGitText.get().submodulePathInvalid, path),
        GITMODULES_PATH);
  }
}
origin: org.eclipse.jgit/org.eclipse.jgit

for (String subsection :
    c.getSubsections(CONFIG_SUBMODULE_SECTION)) {
  assertValidSubmoduleName(subsection);
    assertValidSubmoduleUri(url);
      CONFIG_SUBMODULE_SECTION, subsection, CONFIG_KEY_PATH);
  if (path != null) {
    assertValidSubmodulePath(path);
throw new SubmoduleValidationException(
    JGitText.get().invalidGitModules,
    GITMODULES_PARSE);
origin: org.eclipse.jgit/org.eclipse.jgit

private void checkSubmodules()
    throws IOException {
  ObjectDatabase odb = db.getObjectDatabase();
  if (objectChecker == null) {
    return;
  }
  for (GitmoduleEntry entry : objectChecker.getGitsubmodules()) {
    AnyObjectId blobId = entry.getBlobId();
    ObjectLoader blob = odb.open(blobId, Constants.OBJ_BLOB);
    try {
      SubmoduleValidator.assertValidGitModulesFile(
          new String(blob.getBytes(), UTF_8));
    } catch (LargeObjectException | SubmoduleValidationException e) {
      throw new IOException(e);
    }
  }
}
origin: org.eclipse.jgit/org.eclipse.jgit

  SubmoduleValidator.assertValidSubmoduleName(name);
  SubmoduleValidator.assertValidSubmodulePath(path);
  SubmoduleValidator.assertValidSubmoduleUri(uri);
} catch (SubmoduleValidator.SubmoduleValidationException e) {
  throw new IllegalArgumentException(e.getMessage());
origin: org.eclipse.jgit/org.eclipse.jgit

private void checkGitModules(ProgressMonitor pm, FsckError errors)
    throws IOException {
  pm.beginTask(JGitText.get().validatingGitModules,
      objChecker.getGitsubmodules().size());
  for (GitmoduleEntry entry : objChecker.getGitsubmodules()) {
    AnyObjectId blobId = entry.getBlobId();
    ObjectLoader blob = objdb.open(blobId, Constants.OBJ_BLOB);
    try {
      SubmoduleValidator.assertValidGitModulesFile(
          new String(blob.getBytes(), UTF_8));
    } catch (SubmoduleValidationException e) {
      CorruptObject co = new FsckError.CorruptObject(
          blobId.toObjectId(), Constants.OBJ_BLOB,
          e.getFsckMessageId());
      errors.getCorruptObjects().add(co);
    }
    pm.update(1);
  }
  pm.endTask();
}
origin: berlam/github-bucket

for (String subsection :
    c.getSubsections(CONFIG_SUBMODULE_SECTION)) {
  assertValidSubmoduleName(subsection);
    assertValidSubmoduleUri(url);
      CONFIG_SUBMODULE_SECTION, subsection, CONFIG_KEY_PATH);
  if (path != null) {
    assertValidSubmodulePath(path);
throw new SubmoduleValidationException(
    JGitText.get().invalidGitModules,
    GITMODULES_PARSE);
origin: berlam/github-bucket

  SubmoduleValidator.assertValidSubmoduleName(name);
  SubmoduleValidator.assertValidSubmodulePath(path);
  SubmoduleValidator.assertValidSubmoduleUri(uri);
} catch (SubmoduleValidator.SubmoduleValidationException e) {
  throw new IllegalArgumentException(e.getMessage());
origin: berlam/github-bucket

private void checkGitModules(ProgressMonitor pm, FsckError errors)
    throws IOException {
  pm.beginTask(JGitText.get().validatingGitModules,
      objChecker.getGitsubmodules().size());
  for (GitmoduleEntry entry : objChecker.getGitsubmodules()) {
    AnyObjectId blobId = entry.getBlobId();
    ObjectLoader blob = objdb.open(blobId, Constants.OBJ_BLOB);
    try {
      SubmoduleValidator.assertValidGitModulesFile(
          new String(blob.getBytes(), UTF_8));
    } catch (SubmoduleValidationException e) {
      CorruptObject co = new FsckError.CorruptObject(
          blobId.toObjectId(), Constants.OBJ_BLOB,
          e.getFsckMessageId());
      errors.getCorruptObjects().add(co);
    }
    pm.update(1);
  }
  pm.endTask();
}
origin: org.eclipse.jgit/org.eclipse.jgit

/**
 * Validate URI for a submodule
 *
 * @param uri
 *            uri of a submodule
 * @throws SubmoduleValidationException
 *             uri doesn't seem valid
 */
public static void assertValidSubmoduleUri(String uri)
    throws SubmoduleValidationException {
  if (uri.startsWith("-")) { //$NON-NLS-1$
    throw new SubmoduleValidationException(
        MessageFormat.format(
            JGitText.get().submoduleUrlInvalid, uri),
        GITMODULES_URL);
  }
}
origin: berlam/github-bucket

private void checkSubmodules()
    throws IOException {
  ObjectDatabase odb = db.getObjectDatabase();
  if (objectChecker == null) {
    return;
  }
  for (GitmoduleEntry entry : objectChecker.getGitsubmodules()) {
    AnyObjectId blobId = entry.getBlobId();
    ObjectLoader blob = odb.open(blobId, Constants.OBJ_BLOB);
    try {
      SubmoduleValidator.assertValidGitModulesFile(
          new String(blob.getBytes(), UTF_8));
    } catch (LargeObjectException | SubmoduleValidationException e) {
      throw new IOException(e);
    }
  }
}
origin: org.eclipse.jgit/org.eclipse.jgit

throw new SubmoduleValidationException(MessageFormat
    .format(JGitText.get().invalidNameContainsDotDot, name),
    GITMODULES_NAME);
throw new SubmoduleValidationException(
    MessageFormat.format(
        JGitText.get().submoduleNameInvalid, name),
origin: berlam/github-bucket

/**
 * Validate path for a submodule
 *
 * @param path
 *            path of a submodule
 * @throws SubmoduleValidationException
 *             path doesn't look right
 */
public static void assertValidSubmodulePath(String path)
    throws SubmoduleValidationException {
  if (path.startsWith("-")) { //$NON-NLS-1$
    throw new SubmoduleValidationException(
        MessageFormat.format(
            JGitText.get().submodulePathInvalid, path),
        GITMODULES_PATH);
  }
}
origin: berlam/github-bucket

/**
 * Validate URI for a submodule
 *
 * @param uri
 *            uri of a submodule
 * @throws SubmoduleValidationException
 *             uri doesn't seem valid
 */
public static void assertValidSubmoduleUri(String uri)
    throws SubmoduleValidationException {
  if (uri.startsWith("-")) { //$NON-NLS-1$
    throw new SubmoduleValidationException(
        MessageFormat.format(
            JGitText.get().submoduleUrlInvalid, uri),
        GITMODULES_URL);
  }
}
origin: berlam/github-bucket

throw new SubmoduleValidationException(MessageFormat
    .format(JGitText.get().invalidNameContainsDotDot, name),
    GITMODULES_NAME);
throw new SubmoduleValidationException(
    MessageFormat.format(
        JGitText.get().submoduleNameInvalid, name),
org.eclipse.jgit.internal.submodule

Most used classes

  • SubmoduleValidator$SubmoduleValidationException
    Error validating a git submodule declaration
  • SubmoduleValidator
    Validations for the git submodule fields (name, path, uri). Invalid values in these fields can cause
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now