我正在使用https://github.com/notatestuser/gift
图书馆,这就是我所拥有的:
gitCommit.tree().contents (err, gitTreeContents) ->
console.log gitTreeContents
这给了我树的内容,它是一个包含如下对象的数组:
{ repo:
{ path: '/mygitrepo',
bare: false,
dot_git: '/mygitrepo/.git',
git:
{ [Function]
cmd: [Function],
streamCmd: [Function],
list_remotes: [Function],
refs: [Function] } },
id: 'ed38d79b10503a4e7e68910f37f387f24dedd5fa',
name: 'address.js',
mode: '100644' }
所以两个问题。首先,这是id
指什么?这不是提交 sha,所以我认为它是树状的?其次,我怎样才能看到文件在那个时间点的样子?
谢谢