From c3d8b27f97175935e8163b5d407414119afd9aea Mon Sep 17 00:00:00 2001 From: Kyle Smith Date: Wed, 2 Sep 2015 13:50:57 -0700 Subject: [PATCH] Moved remote.setUrl and remote.setPushurl From instance methods to class methods. Also added the appropriate method signatures --- api/index.md | 6 ++--- api/remote/index.md | 61 ++++++++++++++++++++++++--------------------- 2 files changed, 34 insertions(+), 33 deletions(-) diff --git a/api/index.md b/api/index.md index d623d08..babe457 100644 --- a/api/index.md +++ b/api/index.md @@ -1261,6 +1261,8 @@ sections: | [Remote.isValidName (remote_name)](/api/remote/#isValidName) | Sync | | [Remote.list (repo)](/api/remote/#list) | Async | | [Remote.lookup (repo, name, callback)](/api/remote/#lookup) | Async | +| [Remote.setPushurl (repo, name, url)](/api/remote/#setPushurl) | Sync | +| [Remote.setUrl (repo, name, url)](/api/remote/#setUrl) | Sync | | Instance Methods | | | --- | ---: | @@ -1289,9 +1291,7 @@ sections: | [Remote#save ()](/api/remote/#save) | Sync | | [Remote#setAutotag (value)](/api/remote/#setAutotag) | Sync | | [Remote#setCallbacks (callbacks)](/api/remote/#setCallbacks) | Sync | -| [Remote#setPushurl (url)](/api/remote/#setPushurl) | Sync | | [Remote#setUpdateFetchhead (value)](/api/remote/#setUpdateFetchhead) | Sync | -| [Remote#setUrl (url)](/api/remote/#setUrl) | Sync | | [Remote#stats ()](/api/remote/#stats) | Sync | | [Remote#stop ()](/api/remote/#stop) | Sync | | [Remote#updateFetchhead ()](/api/remote/#updateFetchhead) | Sync | @@ -1787,5 +1787,3 @@ sections: | [Treebuilder#insert (filename, id, filemode)](/api/treebuilder/#insert) | AsyncExperimental | | [Treebuilder#remove (filename)](/api/treebuilder/#remove) | SyncExperimental | | [Treebuilder#write (id)](/api/treebuilder/#write) | SyncExperimental | - - diff --git a/api/remote/index.md b/api/remote/index.md index ea8b8a4..fdfb52f 100644 --- a/api/remote/index.md +++ b/api/remote/index.md @@ -188,6 +188,38 @@ Retrieves the remote by name | --- | --- | | [Remote](/api/remote/) | | +## Remote.setUrl Sync + +```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 | + +## Remote.setPushurl Sync + +```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 | + ## Remote#addFetch Sync ```js @@ -480,20 +512,6 @@ var result = remote.setCallbacks(callbacks); | --- | --- | | Number | 0 or an error code | -## Remote#setPushurl Sync - -```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 | - ## Remote#setUpdateFetchhead Sync ```js @@ -504,20 +522,6 @@ remote.setUpdateFetchhead(value); | --- | --- | --- | | value | Number | 0 to disable updating FETCH_HEAD | -## Remote#setUrl Sync - -```js -var result = remote.setUrl(url); -``` - -| Parameters | Type | -| --- | --- | --- | -| url | String | the url to set | - -| Returns | | -| --- | --- | -| Number | 0 or an error value | - ## Remote#stats Sync ```js @@ -599,4 +603,3 @@ var string = remote.url(); | Remote.COMPLETION_TYPE.COMPLETION_DOWNLOAD | 0 | | Remote.COMPLETION_TYPE.COMPLETION_INDEXING | 1 | | Remote.COMPLETION_TYPE.COMPLETION_ERROR | 2 | -