FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
nodegit/lib/checkout.js at master · dawnsgithub/nodegit · GitHub
dawnsgithub
nodegit
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
nodegit
/
lib
/
checkout.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
51 lines (44 loc) · 1.39 KB
Breadcrumbs
nodegit
/
lib
/
checkout.js
Copy path
File metadata and controls
51 lines (44 loc) · 1.39 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
47
48
49
50
51
var
NodeGit
=
require
(
"../"
)
;
var
normalizeOptions
=
NodeGit
.
Utils
.
normalizeOptions
;
var
Checkout
=
NodeGit
.
Checkout
;
var
_head
=
Checkout
.
head
;
var
_index
=
Checkout
.
index
;
var
_tree
=
Checkout
.
tree
;
/**
* Patch head checkout to automatically coerce objects.
*
*
@async
*
@param
{
Repository
} repo The repo to checkout head
*
@param
{
CheckoutOptions
} [options] Options for the checkout
*
@return
{
Void
} checkout complete
*/
Checkout
.
head
=
function
(
url
,
options
)
{
options
=
normalizeOptions
(
options
||
{
}
,
NodeGit
.
CheckoutOptions
)
;
return
_head
.
call
(
this
,
url
,
options
)
;
}
;
/**
* Patch index checkout to automatically coerce objects.
*
*
@async
*
@param
{
Repository
} repo The repo to checkout an index
*
@param
{
Index
} index The index to checkout
*
@param
{
CheckoutOptions
} [options] Options for the checkout
*
@return
{
Void
} checkout complete
*/
Checkout
.
index
=
function
(
repo
,
index
,
options
)
{
options
=
normalizeOptions
(
options
||
{
}
,
NodeGit
.
CheckoutOptions
)
;
return
_index
.
call
(
this
,
repo
,
index
,
options
)
;
}
;
/**
* Patch tree checkout to automatically coerce objects.
*
*
@async
*
@param
{
Repository
} repo
*
@param
{
String|Tree|Commit|Reference
} treeish
*
@param
{
CheckoutOptions
} [options]
*
@return
{
Void
} checkout complete
*/
Checkout
.
tree
=
function
(
repo
,
treeish
,
options
)
{
options
=
normalizeOptions
(
options
||
{
}
,
NodeGit
.
CheckoutOptions
)
;
return
_tree
.
call
(
this
,
repo
,
treeish
,
options
)
;
}
;
Back
|
FazBrowse Home
|
New Git URL