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 11 package org.eclipse.jgit.lib; 12 13 import java.io.File; 14 15 /** 16 * Base class to support constructing a {@link org.eclipse.jgit.lib.Repository}. 17 * <p> 18 * Applications must set one of {@link #setGitDir(File)} or 19 * {@link #setWorkTree(File)}, or use {@link #readEnvironment()} or 20 * {@link #findGitDir()} in order to configure the minimum property set 21 * necessary to open a repository. 22 * <p> 23 * Single repository applications trying to be compatible with other Git 24 * implementations are encouraged to use a model such as: 25 * 26 * <pre> 27 * new RepositoryBuilder() // 28 * .setGitDir(gitDirArgument) // --git-dir if supplied, no-op if null 29 * .readEnviroment() // scan environment GIT_* variables 30 * .findGitDir() // scan up the file system tree 31 * .build() 32 * </pre> 33 * 34 * @see org.eclipse.jgit.storage.file.FileRepositoryBuilder 35 */ 36 public class RepositoryBuilder extends 37 BaseRepositoryBuilder<RepositoryBuilder, Repository> { 38 // Empty implementation, everything is inherited. 39 }