diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2020-03-10 00:02:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-10 00:02:14 +0100 |
commit | eef67789e846acc85e1ed2af2760d6716b2a9f07 (patch) | |
tree | b3578068aca7e71d27fda254d919e6e0ad9e90ba /options.go | |
parent | 87d3d897d903af9cdd5cf500fd36d3533235fc02 (diff) | |
parent | 027dadf289dcf974405d283d13d5a856b0988b38 (diff) | |
download | go-git-eef67789e846acc85e1ed2af2760d6716b2a9f07.tar.gz |
Merge pull request #3 from go-git/pr-1248
git.LogOptions: add `PathFilter func(string) bool`
Diffstat (limited to 'options.go')
-rw-r--r-- | options.go | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -343,8 +343,15 @@ type LogOptions struct { // Show only those commits in which the specified file was inserted/updated. // It is equivalent to running `git log -- <file-name>`. + // this field is kept for compatility, it can be replaced with PathFilter FileName *string + // Filter commits based on the path of files that are updated + // takes file path as argument and should return true if the file is desired + // It can be used to implement `git log -- <path>` + // either <path> is a file path, or directory path, or a regexp of file/directory path + PathFilter func(string) bool + // Pretend as if all the refs in refs/, along with HEAD, are listed on the command line as <commit>. // It is equivalent to running `git log --all`. // If set on true, the From option will be ignored. |