A remote configuration remembers one or more URLs for a frequently accessed remote repository as well as zero or more fetch and push specifications describing how refs should be transferred between this repository and the remote repository.
| Modifier and Type | Field and Description |
|---|---|
| private static final boolean | |
| public static final String | DEFAULT_RECEIVE_PACK
Default value for |
| public static final String | DEFAULT_UPLOAD_PACK
Default value for |
| private List | |
| private static final String | |
| private static final String | |
| private static final String | |
| private static final String | |
| private static final String | |
| private static final String | |
| private static final String | |
| private static final String | |
| private static final String | |
| private boolean | |
| private String | |
| private List | |
| private List | |
| private String | |
| private static final String | |
| private static final long | |
| private TagOpt | |
| private int | |
| private String | |
| private List |
| Access | Constructor and Description |
|---|---|
| public | RemoteConfig(Config
the existing configuration to get the remote settings from.
The configuration must already be loaded into memory. rc, String subsection key indicating the name of this remote. remoteName)Parse a remote block from an existing configuration file. |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if the specification was added; false if it already exists.the new specification to add. s)Add a new fetch RefSpec to this remote. |
| public boolean | Returns: true if the specification was added; false if it already exists.the new specification to add. s)Add a new push RefSpec to this remote. |
| public boolean | Returns: true if the URI was added; false if it already exists.the new URI to add to this remote. toAdd)Add a new push-only URI to the end of the list of URIs. |
| public boolean | |
| public static List | Returns: all remotes configurations existing in provided repository configuration. Returned configurations are ordered lexicographically by names.the existing configuration to get the remote settings from.
The configuration must already be loaded into memory. rc)Parse all remote blocks in an existing configuration file, looking for remotes configuration. |
| public List | Returns: set of specs used by default when fetching.Remembered specifications for fetching from a repository. |
| public String | Returns: name assigned by the user to this configuration block.Get the local name this remote configuration is recognized as. |
| public List | Returns: set of specs used by default when pushing.Remembered specifications for pushing to a repository. |
| public List | Returns: the set of URIs known to this remote.Get all configured push-only URIs under this remote. |
| public String | Returns: location of 'git-receive-pack' on the remote system. If no location has been configured the default of 'git-receive-pack' is returned instead.Override for the location of 'git-receive-pack' on the remote system. |
| public TagOpt | Returns: option indicating the behavior of annotated tags in fetch.Get the description of how annotated tags should be treated during fetch. |
| public int | Returns: timeout (in seconds) before aborting an IO operation.Get timeout (in seconds) before aborting an IO operation. |
| public String | Returns: location of 'git-upload-pack' on the remote system. If no location has been configured the default of 'git-upload-pack' is returned instead.Override for the location of 'git-upload-pack' on the remote system. |
| public List | |
| public boolean | Returns: true if pushing to the remote automatically deletes remote refs which don't exist on the source side.Whether pushing to the remote automatically deletes remote refs which don't exist on the source side. |
| public boolean | Returns: true if the specification existed and was removed.the specification to remove. s)Remove a fetch RefSpec from this remote. |
| public boolean | Returns: true if the specification existed and was removed.the specification to remove. s)Remove a push RefSpec from this remote. |
| public boolean | Returns: true if the URI was added; false if it already exists.the URI to remove from this remote. toRemove)Remove a push-only URI from the list of URIs. |
| public boolean | |
| private void | |
| private void | |
| private void | |
| public void | setFetchRefSpecs(List<RefSpec>
list of fetch specifications to set. List is copied, it can be
modified after this call. specs)Override existing fetch specifications with new ones. |
| public void | setMirror(boolean
true to automatically delete remote refs during push. m)Set the mirror flag to automatically delete remote refs. |
| public void | setPushRefSpecs(List<RefSpec>
list of push specifications to set. List is copied, it can be
modified after this call. specs)Override existing push specifications with new ones. |
| public void | |
| public void | setTimeout(int
number of seconds to wait (with no data transfer occurring)
before aborting an IO read or write operation with this
remote. A timeout of 0 will block indefinitely. seconds)Set the timeout before willing to abort an IO call. |
| private void | |
| public void |
| DEFAULT_MIRROR | back to summary |
|---|---|
| private static final boolean DEFAULT_MIRROR | |
| DEFAULT_RECEIVE_PACK | back to summary |
|---|---|
| public static final String DEFAULT_RECEIVE_PACK Default value for | |
| DEFAULT_UPLOAD_PACK | back to summary |
|---|---|
| public static final String DEFAULT_UPLOAD_PACK Default value for | |
| fetch | back to summary |
|---|---|
| private List<RefSpec> fetch | |
| KEY_FETCH | back to summary |
|---|---|
| private static final String KEY_FETCH | |
| KEY_MIRROR | back to summary |
|---|---|
| private static final String KEY_MIRROR | |
| KEY_PUSH | back to summary |
|---|---|
| private static final String KEY_PUSH | |
| KEY_PUSHURL | back to summary |
|---|---|
| private static final String KEY_PUSHURL | |
| KEY_RECEIVEPACK | back to summary |
|---|---|
| private static final String KEY_RECEIVEPACK | |
| KEY_TAGOPT | back to summary |
|---|---|
| private static final String KEY_TAGOPT | |
| KEY_TIMEOUT | back to summary |
|---|---|
| private static final String KEY_TIMEOUT | |
| KEY_UPLOADPACK | back to summary |
|---|---|
| private static final String KEY_UPLOADPACK | |
| KEY_URL | back to summary |
|---|---|
| private static final String KEY_URL | |
| mirror | back to summary |
|---|---|
| private boolean mirror | |
| name | back to summary |
|---|---|
| private String name | |
| push | back to summary |
|---|---|
| private List<RefSpec> push | |
| pushURIs | back to summary |
|---|---|
| private List<URIish> pushURIs | |
| receivepack | back to summary |
|---|---|
| private String receivepack | |
| SECTION | back to summary |
|---|---|
| private static final String SECTION | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| tagopt | back to summary |
|---|---|
| private TagOpt tagopt | |
| timeout | back to summary |
|---|---|
| private int timeout | |
| uploadpack | back to summary |
|---|---|
| private String uploadpack | |
| uris | back to summary |
|---|---|
| private List<URIish> uris | |
| RemoteConfig | back to summary |
|---|---|
| public RemoteConfig(Config rc, String remoteName) throws URISyntaxException Parse a remote block from an existing configuration file. This constructor succeeds even if the requested remote is not defined within the supplied configuration file. If that occurs then there will be no URIs and no ref specifications known to the new instance.
| |
| addFetchRefSpec | back to summary |
|---|---|
| public boolean addFetchRefSpec(RefSpec s) Add a new fetch RefSpec to this remote.
| |
| addPushRefSpec | back to summary |
|---|---|
| public boolean addPushRefSpec(RefSpec s) Add a new push RefSpec to this remote.
| |
| addPushURI | back to summary |
|---|---|
| public boolean addPushURI(URIish toAdd) Add a new push-only URI to the end of the list of URIs.
| |
| addURI | back to summary |
|---|---|
| public boolean addURI(URIish toAdd) Add a new URI to the end of the list of URIs.
| |
| getAllRemoteConfigs | back to summary |
|---|---|
| public static List Parse all remote blocks in an existing configuration file, looking for remotes configuration.
| |
| getFetchRefSpecs | back to summary |
|---|---|
| public List Remembered specifications for fetching from a repository. | |
| getName | back to summary |
|---|---|
| public String getName() Get the local name this remote configuration is recognized as.
| |
| getPushRefSpecs | back to summary |
|---|---|
| public List Remembered specifications for pushing to a repository. | |
| getPushURIs | back to summary |
|---|---|
| public List Get all configured push-only URIs under this remote. | |
| getReceivePack | back to summary |
|---|---|
| public String getReceivePack() Override for the location of 'git-receive-pack' on the remote system. This value is only useful for an SSH style connection, where Git is asking the remote system to execute a program that provides the necessary network protocol.
| |
| getTagOpt | back to summary |
|---|---|
| public TagOpt getTagOpt() Get the description of how annotated tags should be treated during fetch.
| |
| getTimeout | back to summary |
|---|---|
| public int getTimeout() Get timeout (in seconds) before aborting an IO operation.
| |
| getUploadPack | back to summary |
|---|---|
| public String getUploadPack() Override for the location of 'git-upload-pack' on the remote system. This value is only useful for an SSH style connection, where Git is asking the remote system to execute a program that provides the necessary network protocol.
| |
| getURIs | back to summary |
|---|---|
| public List Get all configured URIs under this remote. | |
| isMirror | back to summary |
|---|---|
| public boolean isMirror() Whether pushing to the remote automatically deletes remote refs which don't exist on the source side.
| |
| removeFetchRefSpec | back to summary |
|---|---|
| public boolean removeFetchRefSpec(RefSpec s) Remove a fetch RefSpec from this remote.
| |
| removePushRefSpec | back to summary |
|---|---|
| public boolean removePushRefSpec(RefSpec s) Remove a push RefSpec from this remote.
| |
| removePushURI | back to summary |
|---|---|
| public boolean removePushURI(URIish toRemove) Remove a push-only URI from the list of URIs.
| |
| removeURI | back to summary |
|---|---|
| public boolean removeURI(URIish toRemove) Remove a URI from the list of URIs.
| |
| set | back to summary |
|---|---|
| private void set(final Config rc, final String key, final String currentValue, final String defaultValue) | |
| set | back to summary |
|---|---|
| private void set(final Config rc, final String key, final boolean currentValue, final boolean defaultValue) | |
| set | back to summary |
|---|---|
| private void set(final Config rc, final String key, final int currentValue, final int defaultValue) | |
| setFetchRefSpecs | back to summary |
|---|---|
| public void setFetchRefSpecs(List<RefSpec> specs) Override existing fetch specifications with new ones. | |
| setMirror | back to summary |
|---|---|
| public void setMirror(boolean m) Set the mirror flag to automatically delete remote refs.
| |
| setPushRefSpecs | back to summary |
|---|---|
| public void setPushRefSpecs(List<RefSpec> specs) Override existing push specifications with new ones. | |
| setTagOpt | back to summary |
|---|---|
| public void setTagOpt(TagOpt option) Set the description of how annotated tags should be treated on fetch.
| |
| setTimeout | back to summary |
|---|---|
| public void setTimeout(int seconds) Set the timeout before willing to abort an IO call.
| |
| unset | back to summary |
|---|---|
| private void unset(Config rc, String key) | |
| update | back to summary |
|---|---|
| public void update(Config rc) Update this remote's definition within the configuration.
| |