You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

RepositoryBuilder.java 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * Copyright (C) 2010, Google Inc. and others
  3. *
  4. * This program and the accompanying materials are made available under the
  5. * terms of the Eclipse Distribution License v. 1.0 which is available at
  6. * https://www.eclipse.org/org/documents/edl-v10.php.
  7. *
  8. * SPDX-License-Identifier: BSD-3-Clause
  9. */
  10. package org.eclipse.jgit.lib;
  11. import java.io.File;
  12. /**
  13. * Base class to support constructing a {@link org.eclipse.jgit.lib.Repository}.
  14. * <p>
  15. * Applications must set one of {@link #setGitDir(File)} or
  16. * {@link #setWorkTree(File)}, or use {@link #readEnvironment()} or
  17. * {@link #findGitDir()} in order to configure the minimum property set
  18. * necessary to open a repository.
  19. * <p>
  20. * Single repository applications trying to be compatible with other Git
  21. * implementations are encouraged to use a model such as:
  22. *
  23. * <pre>
  24. * new RepositoryBuilder() //
  25. * .setGitDir(gitDirArgument) // --git-dir if supplied, no-op if null
  26. * .readEnviroment() // scan environment GIT_* variables
  27. * .findGitDir() // scan up the file system tree
  28. * .build()
  29. * </pre>
  30. *
  31. * @see org.eclipse.jgit.storage.file.FileRepositoryBuilder
  32. */
  33. public class RepositoryBuilder extends
  34. BaseRepositoryBuilder<RepositoryBuilder, Repository> {
  35. // Empty implementation, everything is inherited.
  36. }