FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
nodegit/lib/revert.js at v0.16.0 · nodegit/nodegit · GitHub
nodegit
nodegit
Repository navigation
Code
Issues
344
(344)
Pull requests
23
(23)
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
nodegit
/
lib
/
revert.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
46 lines (42 loc) · 1.11 KB
Breadcrumbs
nodegit
/
lib
/
revert.js
Copy path
File metadata and controls
46 lines (42 loc) · 1.11 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
var
NodeGit
=
require
(
"../"
)
;
var
normalizeOptions
=
NodeGit
.
Utils
.
normalizeOptions
;
var
Revert
=
NodeGit
.
Revert
;
var
_commit
=
Revert
.
commit
;
/**
* Reverts the given commit against the given "our" commit, producing an index
* that reflects the result of the revert.
*
*
@async
*
@param
{
Repository
} repo the repository that contains the given commits.
*
@param
{
Commit
} revert_commit the commit to revert
*
@param
{
Commit
} our_commit the commit to revert against (e.g. HEAD)
*
@param
{
Number
} mainline the parent of the revert commit, if it is a merge
*
@param
{
MergeOptions
} merge_options the merge options (or null for defaults)
*
*
@return
{
Index
} the index result
*/
Revert
.
commit
=
function
(
repo
,
revert_commit
,
our_commit
,
mainline
,
merge_options
,
callback
)
{
merge_options
=
normalizeOptions
(
merge_options
,
NodeGit
.
MergeOptions
)
;
return
_commit
.
call
(
this
,
repo
,
revert_commit
,
our_commit
,
mainline
,
merge_options
)
.
then
(
function
(
result
)
{
if
(
typeof
callback
===
"function"
)
{
callback
(
null
,
result
)
;
}
return
result
;
}
,
callback
)
;
}
;
Back
|
FazBrowse Home
|
New Git URL