FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
nodegit/example/raw-blob.js at v0.0.6 · nodegit/nodegit · GitHub
nodegit
nodegit
Repository navigation
Code
Issues
344
(344)
Pull requests
21
(21)
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
nodegit
/
example
/
raw-blob.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
24 lines (20 loc) · 691 Bytes
Breadcrumbs
nodegit
/
example
/
raw-blob.js
Copy path
File metadata and controls
24 lines (20 loc) · 691 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
var
git
=
require
(
'../'
)
.
raw
,
path
=
require
(
'path'
)
;
var
repo
=
new
git
.
Repo
(
)
;
repo
.
open
(
path
.
resolve
(
'../.git'
)
,
function
(
)
{
var
oid
=
new
git
.
Oid
(
)
;
oid
.
mkstr
(
'59b20b8d5c6ff8d09518454d4dd8b7b30f095ab5'
)
;
var
commit
=
new
git
.
Commit
(
)
;
commit
.
lookup
(
repo
,
oid
,
function
(
err
)
{
var
tree
=
new
git
.
Tree
(
repo
)
,
entry
=
new
git
.
TreeEntry
(
)
,
blob
=
new
git
.
Blob
(
repo
)
;
if
(
!
commit
.
tree
(
tree
)
&&
tree
.
entryCount
(
)
>
1
)
{
tree
.
entryByIndex
(
entry
,
1
)
;
entry
.
toObject
(
repo
,
blob
)
;
console
.
log
(
entry
.
name
(
)
+
':'
)
;
console
.
log
(
blob
.
rawSize
(
)
)
;
console
.
log
(
typeof
blob
.
rawContent
(
)
)
;
}
}
)
;
}
)
;
Back
|
FazBrowse Home
|
New Git URL