Skip to content

Commit

Permalink
update docs [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
sentientwaffle committed Mar 23, 2012
1 parent 6e85678 commit b8bba25
Showing 1 changed file with 54 additions and 54 deletions.
108 changes: 54 additions & 54 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ A simple Node.js wrapper for the Git CLI. The API is based on
# => #<Repo>

## Repo
### Repo#path
### `Repo#path`
`String` - The path to the repository.

### Repo#commits([treeish, [limit, [skip, ]]]callback)
### `Repo#commits([treeish, [limit, [skip, ]]]callback)`
Get a list of commits.

* `treeish` - `String` (optional).
Expand All @@ -45,72 +45,72 @@ Skip some (for pagination):

repo.commits "master", 30, 30, (err, commits) ->

### Repo#tree([treeish]) => Tree
### `Repo#tree([treeish]) => Tree`
The `Tree` object for the treeish (which defaults to "master").

repo.tree().contents (err, children) ->
for child in children
console.log child.name

### Repo#diff(commitA, commitB, [paths, ]callback)
### `Repo#diff(commitA, commitB, [paths, ]callback)`
Get the difference between the trees.

The callback receives `(err, diffs)`.

### Repo#remotes(callback)
### `Repo#remotes(callback)`
Get the repository's remotes.

Receives `(err, remotes)`, where each remote is a Ref.

### Repo#remote_list(callback)
### `Repo#remote_list(callback)`
Get a list of the repository's remote names.

Get the string names of each of the remotes.

### Repo#remote_add(name, url, callback)
### `Repo#remote_add(name, url, callback)`
Equivalent to `git remote add <name> <url>`.

### Repo#remote_fetch(name, callback)
### `Repo#remote_fetch(name, callback)`
`git fetch <name>`


### Repo#status(callback)
### `Repo#status(callback)`
The callback receives `(err, status)`.

### Repo#create_branch(name, callback)
### `Repo#create_branch(name, callback)`
Create a new branch with `name`, and call the callback when complete
with an error, if one occurred.

### Repo#delete_branch(name, callback)
### `Repo#delete_branch(name, callback)`
Delete the branch `name`, and call the callback with an error, if one occurred.

### Repo#tags(callback)
### `Repo#tags(callback)`
Get a list of `Tag`s.

### Repo#create_tag(name, callback)
### `Repo#create_tag(name, [options, ]callback)`
Create a tab with the given name.

### Repo#delete_tag(name, callback)
### `Repo#delete_tag(name, callback)`
Delete the tag with the given name.

### Repo#branches(callback)
### `Repo#branches(callback)`
`callback` receives `(err, heads)`.

### Repo#create_branch(name, callback)
### `Repo#create_branch(name, callback)`
Create a branch with the given name.

### Repo#delete_branch(delete, callback)
### `Repo#delete_branch(delete, callback)`
Delete the branch with the given name.

### Repo#branch([branch, ]callback)
### `Repo#branch([branch, ]callback)`
Get a branch.

* `branch` - The name of the branch to get. Defaults to the
currently checked out branch.
* `callback` - Receives `(err, head)`.


### Repo#commit(message, [options, ]callback)
### `Repo#commit(message, [options, ]callback)`
Commit some changes.

* `message` - `String`
Expand All @@ -119,66 +119,66 @@ Commit some changes.
- `amend` - `Boolean`
* `callback` - Receives `(err)`.

### Repo#add(files, callback)
### `Repo#add(files, callback)`
`git add <files>`

### Repo#remove(files, callback)
### `Repo#remove(files, callback)`
`git rm <files>`

### Repo#checkout(treeish, callback)
### `Repo#checkout(treeish, callback)`
`git checkout <treeish>`

## Commit
### Commit#id
### `Commit#id`
`String` - The commit's SHA.

### Commit#parents
### `Commit#parents`
`Commit[]`

### Commit#tree(callback)
### `Commit#tree(callback)`

* `callback` - Receives `(err, tree)`.

### Commit#author
### `Commit#author`
`Actor`
### Commit#authored_date
### `Commit#authored_date`
`Date`
### Commit#committer
### `Commit#committer`
`Actor`
### Commit#committed_date
### `Commit#committed_date`
`Date`
### Commit#message
### `Commit#message`
`String`


## Head
### Head#name
### `Head#name`
`String`

### Head#commit
### `Head#commit`
`Commit`

## Tag
### Tag#name
### `Tag#name`
`String`

### Tag#commit
### `Tag#commit`
`Commit`

### Tag#message(callback)
### `Tag#message(callback)`
The callback receives `(err, message)` (`message` is a String).

### Tag#tagger(callback)
### `Tag#tagger(callback)`
The callback receives `(err, actor)`.

### Tag#tag_date(callback)
### `Tag#tag_date(callback)`
The callback receives `(err, date)`.

## Status
### Status#clean
### `Status#clean`
`Boolean`

### Status#files
### `Status#files`
`Object` - The keys are files, the values objects indicating whether or not
the file is staged, tracked, etc.

Expand All @@ -189,63 +189,63 @@ Each file has the following properties:
* `tracked` - `Boolean`

## Actor
### Actor#name
### `Actor#name`
`String`

### Actor#email
### `Actor#email`
`String`

### Actor#hash
### `Actor#hash`
`String` - The MD5 hash of the actor's email. Useful for displaying
[Gravatar](http://en.gravatar.com/) avatars.


## Tree
### Tree#id
### `Tree#id`
`String` - SHA1

### Tree#contents(callback)
### `Tree#contents(callback)`

* `callback` - Receives `(err, children)`.
* `children` - An array of `Blob`s, `Tree`s, and `Submodule`s.

### Tree#blobs(callback)
### `Tree#blobs(callback)`

* `callback` - Receives `(err, child_blobs)`.
* `children` - `[Blob]`

### Tree#trees(callback)
### `Tree#trees(callback)`

* `callback` - Receives `(err, child_trees)`.
* `children` - `[Tree]`

### Tree#find(directory, callback)
### `Tree#find(directory, callback)`

* `directory` - `String`
* `callback` - Receives `(err, thing)`.

## Blob
### Blob#id
### `Blob#id`
`String` - SHA1

### Blob#mode
### `Blob#mode`
`String`

### Blob#data(callback)
### `Blob#data(callback)`

* `callback` - `(err, data)`

## Submodule
### Submodule#id
### `Submodule#id`
`String`

### Submodule#name
### `Submodule#name`
`String`

### Submodule#mode
### `Submodule#mode`
`String`

### Submodule#url(callback)
### `Submodule#url(callback)`
Get the url the submodule points to.


Expand Down

0 comments on commit b8bba25

Please sign in to comment.