Revparse.ext
var result = Revparse.ext(object_out, reference_out, repo, spec);
| Parameters | Type | |
|---|---|---|
| object_out | Object | pointer to output object |
| reference_out | Reference | pointer to output reference or NULL |
| repo | Repository | the repository to search in |
| spec | String | the textual specification for an object |
| Returns | |
|---|---|
| Number | 0 on success, GIT_ENOTFOUND, GIT_EAMBIGUOUS, GIT_EINVALIDSPEC |
| or an error code |
Revparse.single
Revparse.single(repo, spec).then(function(object) {
// Use object
});
| Parameters | Type | |
|---|---|---|
| repo | Repository | the repository to search in |
| spec | String | the textual specification for an object |
| Returns | |
|---|---|
| Object |
Revparse.MODE
| Flag | Value |
|---|---|
| Revparse.MODE.SINGLE | 1 |
| Revparse.MODE.RANGE | 2 |
| Revparse.MODE.MERGE_BASE | 4 |