FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
nodegit.nodegit/lib/checkout.js at enable-stash · javascript-forks/nodegit.nodegit · GitHub
javascript-forks
nodegit.nodegit
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
nodegit.nodegit
/
lib
/
checkout.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
35 lines (30 loc) · 931 Bytes
Breadcrumbs
nodegit.nodegit
/
lib
/
checkout.js
Copy path
File metadata and controls
35 lines (30 loc) · 931 Bytes
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
var
NodeGit
=
require
(
"../"
)
;
var
normalizeOptions
=
NodeGit
.
Utils
.
normalizeOptions
;
var
Checkout
=
NodeGit
.
Checkout
;
var
head
=
Checkout
.
head
;
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 tree checkout to automatically coerce objects.
*
*
@async
*
@param
{
Repository
} repo
*
@param
{
Oid|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