list all git objects (in recency order)
Latest commit 5d3ee63 May 27, 2013 @chrisdickinson Merge pull request #1 from alessioalex/patch-1
Updated - repo.refs() instead of repo.refs
Failed to load latest commit information. Updated - repo.refs() instead of repo.refs May 27, 2013
index.js first commit Apr 27, 2013
package.json 0.0.2 Apr 28, 2013


given a find function, a list of hashes, and an optional list of "end" hashes, list all git objects in recency order as a stream.

var list = require('git-list-objects')
  , open = require('git-fs-repo')

open('path/to/.git', function(err, repo) {
  var hashes = repo.refs().map(function(x) {
    return x.hash

  list(repo.find, hashes)
    .on('data', function(meta) {
      meta.type // integer type
      meta.path // [{mode: 0000, name: '', hash: Buffer}]
      meta.size // integer byte size of object
      meta.obj  // original git object 


list(find, hashes[, endpoints]) -> list stream

create a stream that will start emitting data on the next tick.

find is a function that takes a string object id and a ready node-style (err, data) callback.

hashes (and endpoints, if present) should be a list of string object ids.