diff options
author | Saeed Rasooli <saeed.gnu@gmail.com> | 2019-11-29 13:25:05 +0330 |
---|---|---|
committer | Saeed Rasooli <saeed.gnu@gmail.com> | 2019-11-29 16:46:43 +0330 |
commit | f54ee6d2b1f92d67ed567027f7a8ec1f2139c532 (patch) | |
tree | 588e34921a0dd445455fb709ea171c4d6b5ad445 /repository.go | |
parent | 1a7db85bca7027d90afdb5ce711622aaac9feaed (diff) | |
download | go-git-f54ee6d2b1f92d67ed567027f7a8ec1f2139c532.tar.gz |
add NewCommitPathIterFromIter that accepts pathFilter func(string) bool
keep NewCommitFileIterFromIter for compatibilty for now
Signed-off-by: Saeed Rasooli <saeed.gnu@gmail.com>
Diffstat (limited to 'repository.go')
-rw-r--r-- | repository.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/repository.go b/repository.go index 11269ef..2bb2afb 100644 --- a/repository.go +++ b/repository.go @@ -1099,7 +1099,13 @@ func (r *Repository) logAll(commitIterFunc func(*object.Commit) object.CommitIte } func (*Repository) logWithFile(fileName string, commitIter object.CommitIter, checkParent bool) object.CommitIter { - return object.NewCommitFileIterFromIter(fileName, commitIter, checkParent) + return object.NewCommitPathIterFromIter( + func(path string) bool { + return path == fileName + }, + commitIter, + checkParent, + ) } func (*Repository) logWithLimit(commitIter object.CommitIter, limitOptions object.LogLimitOptions) object.CommitIter { |