aboutsummaryrefslogtreecommitdiffstats
path: root/options.go
diff options
context:
space:
mode:
authorknqyf263 <knqyf263@gmail.com>2019-08-03 16:30:58 -1000
committerknqyf263 <knqyf263@gmail.com>2019-08-04 23:27:33 -1000
commitc7fc75ef6ebd7127e0918b1669d336ba39844201 (patch)
tree3511322c02b495d4b06cdeacc669bbf822a4708c /options.go
parenta0c8105a91910a022fe2b8d154f0a9ee777f7310 (diff)
downloadgo-git-c7fc75ef6ebd7127e0918b1669d336ba39844201.tar.gz
Add limiting options to git log
Signed-off-by: knqyf263 <knqyf263@gmail.com>
Diffstat (limited to 'options.go')
-rw-r--r--options.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/options.go b/options.go
index 0f728e7..cc8f9c5 100644
--- a/options.go
+++ b/options.go
@@ -4,6 +4,7 @@ import (
"errors"
"regexp"
"strings"
+ "time"
"golang.org/x/crypto/openpgp"
"gopkg.in/src-d/go-git.v4/config"
@@ -348,6 +349,14 @@ type LogOptions struct {
// It is equivalent to running `git log --all`.
// If set on true, the From option will be ignored.
All bool
+
+ // Show commits more recent than a specific date.
+ // It is equivalent to running `git log --since <date>` or `git log --after <date>`.
+ Since *time.Time
+
+ // Show commits older than a specific date.
+ // It is equivalent to running `git log --until <date>` or `git log --before <date>`.
+ Until *time.Time
}
var (