code: func NewRewriter(db *gitobj.ObjectDatabase, opts ...rewriterOption) *Rewriter {
  	rewriter := &Rewriter{
  		mu:      new(sync.Mutex),
  		entries: make(map[string]*gitobj.TreeEntry),
  		commits: make(map[string][]byte),
  
  		db: db,
  	}
  
  	for _, opt := range opts {
  		opt(rewriter)
  	}
  	return rewriter
  }
docs: // NewRewriter constructs a *Rewriter from the given *ObjectDatabase instance.