diff options
author | onee-only <kimww0306@gmail.com> | 2024-03-05 09:33:22 +0900 |
---|---|---|
committer | onee-only <kimww0306@gmail.com> | 2024-03-05 09:33:22 +0900 |
commit | fc222017c0c8e72a7b0a30aab46b494cbc92d3ab (patch) | |
tree | 419a84386efaf700a7f1ce16fd3a5bcf76f1dcaa /plumbing/object/commit_walker_path.go | |
parent | fb04aa392c8d4c259cb5b21c1cb4c6f8076e600b (diff) | |
download | go-git-fc222017c0c8e72a7b0a30aab46b494cbc92d3ab.tar.gz |
plumbing: object, Make first commit visible on logs filtered with filename. Fixes #191
Diffstat (limited to 'plumbing/object/commit_walker_path.go')
-rw-r--r-- | plumbing/object/commit_walker_path.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plumbing/object/commit_walker_path.go b/plumbing/object/commit_walker_path.go index aa0ca15..e054966 100644 --- a/plumbing/object/commit_walker_path.go +++ b/plumbing/object/commit_walker_path.go @@ -115,7 +115,8 @@ func (c *commitPathIter) hasFileChange(changes Changes, parent *Commit) bool { // filename matches, now check if source iterator contains all commits (from all refs) if c.checkParent { - if parent != nil && isParentHash(parent.Hash, c.currentCommit) { + // Check if parent is beyond the initial commit + if parent == nil || isParentHash(parent.Hash, c.currentCommit) { return true } continue |