Skip to content

Updated Remote Methods #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -1261,6 +1261,8 @@ sections:
| [<span>Remote.</span>isValidName <span>(remote_name)</span>](/api/remote/#isValidName) | <span class="tags"><span class="sync">Sync</span></span> |
| [<span>Remote.</span>list <span>(repo)</span>](/api/remote/#list) | <span class="tags"><span class="async">Async</span></span> |
| [<span>Remote.</span>lookup <span>(repo, name, callback)</span>](/api/remote/#lookup) | <span class="tags"><span class="async">Async</span></span> |
| [<span>Remote.</span>setPushurl <span>(repo, name, url)</span>](/api/remote/#setPushurl) | <span class="tags"><span class="sync">Sync</span></span> |
| [<span>Remote.</span>setUrl <span>(repo, name, url)</span>](/api/remote/#setUrl) | <span class="tags"><span class="sync">Sync</span></span> |

| Instance Methods | |
| --- | ---: |
Expand Down Expand Up @@ -1289,9 +1291,7 @@ sections:
| [<span>Remote#</span>save <span>()</span>](/api/remote/#save) | <span class="tags"><span class="sync">Sync</span></span> |
| [<span>Remote#</span>setAutotag <span>(value)</span>](/api/remote/#setAutotag) | <span class="tags"><span class="sync">Sync</span></span> |
| [<span>Remote#</span>setCallbacks <span>(callbacks)</span>](/api/remote/#setCallbacks) | <span class="tags"><span class="sync">Sync</span></span> |
| [<span>Remote#</span>setPushurl <span>(url)</span>](/api/remote/#setPushurl) | <span class="tags"><span class="sync">Sync</span></span> |
| [<span>Remote#</span>setUpdateFetchhead <span>(value)</span>](/api/remote/#setUpdateFetchhead) | <span class="tags"><span class="sync">Sync</span></span> |
| [<span>Remote#</span>setUrl <span>(url)</span>](/api/remote/#setUrl) | <span class="tags"><span class="sync">Sync</span></span> |
| [<span>Remote#</span>stats <span>()</span>](/api/remote/#stats) | <span class="tags"><span class="sync">Sync</span></span> |
| [<span>Remote#</span>stop <span>()</span>](/api/remote/#stop) | <span class="tags"><span class="sync">Sync</span></span> |
| [<span>Remote#</span>updateFetchhead <span>()</span>](/api/remote/#updateFetchhead) | <span class="tags"><span class="sync">Sync</span></span> |
Expand Down Expand Up @@ -1787,5 +1787,3 @@ sections:
| [<span>Treebuilder#</span>insert <span>(filename, id, filemode)</span>](/api/treebuilder/#insert) | <span class="tags"><span class="async">Async</span><span class="experimental">Experimental</span></span> |
| [<span>Treebuilder#</span>remove <span>(filename)</span>](/api/treebuilder/#remove) | <span class="tags"><span class="sync">Sync</span><span class="experimental">Experimental</span></span> |
| [<span>Treebuilder#</span>write <span>(id)</span>](/api/treebuilder/#write) | <span class="tags"><span class="sync">Sync</span><span class="experimental">Experimental</span></span> |


61 changes: 32 additions & 29 deletions api/remote/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,38 @@ Retrieves the remote by name
| --- | --- |
| [Remote](/api/remote/) | |

## <a name="setUrl"></a><span>Remote.</span>setUrl <span class="tags"><span class="sync">Sync</span></span>

```js
var result = Remote.setUrl(repo, name, url);
```

| Parameters | Type |
| --- | --- | --- |
| repo | [Repository](/api/repository/) | The repo that the remote lives in |
| name | String | The name of the remote to modify |
| url | String | the url to set |

| Returns | |
| --- | --- |
| Number | 0 or an error value |

## <a name="setPushurl"></a><span>Remote.</span>setPushurl <span class="tags"><span class="sync">Sync</span></span>

```js
var result = Remote.setPushurl(repo, name, url);
```

| Parameters | Type |
| --- | --- | --- |
| repo | [Repository](/api/repository/) | The repo that the remote lives in |
| name | String | The name of the remote to modify |
| url | String | the url to set or NULL to clear the pushurl |

| Returns | |
| --- | --- |
| Number | 0 or an error value |

## <a name="addFetch"></a><span>Remote#</span>addFetch <span class="tags"><span class="sync">Sync</span></span>

```js
Expand Down Expand Up @@ -480,20 +512,6 @@ var result = remote.setCallbacks(callbacks);
| --- | --- |
| Number | 0 or an error code |

## <a name="setPushurl"></a><span>Remote#</span>setPushurl <span class="tags"><span class="sync">Sync</span></span>

```js
var result = remote.setPushurl(url);
```

| Parameters | Type |
| --- | --- | --- |
| url | String | the url to set or NULL to clear the pushurl |

| Returns | |
| --- | --- |
| Number | 0 or an error value |

## <a name="setUpdateFetchhead"></a><span>Remote#</span>setUpdateFetchhead <span class="tags"><span class="sync">Sync</span></span>

```js
Expand All @@ -504,20 +522,6 @@ remote.setUpdateFetchhead(value);
| --- | --- | --- |
| value | Number | 0 to disable updating FETCH_HEAD |

## <a name="setUrl"></a><span>Remote#</span>setUrl <span class="tags"><span class="sync">Sync</span></span>

```js
var result = remote.setUrl(url);
```

| Parameters | Type |
| --- | --- | --- |
| url | String | the url to set |

| Returns | |
| --- | --- |
| Number | 0 or an error value |

## <a name="stats"></a><span>Remote#</span>stats <span class="tags"><span class="sync">Sync</span></span>

```js
Expand Down Expand Up @@ -599,4 +603,3 @@ var string = remote.url();
| <span>Remote.COMPLETION_TYPE.</span>COMPLETION_DOWNLOAD | 0 |
| <span>Remote.COMPLETION_TYPE.</span>COMPLETION_INDEXING | 1 |
| <span>Remote.COMPLETION_TYPE.</span>COMPLETION_ERROR | 2 |