index
:
gogs.git
Gogs is a painless self-hosted Git service
log msg
author
committer
range
buildscript
main
mygogs
about
summary
refs
log
tree
commit
diff
path:
root
/
modules
/
git
/
version.go
diff options
context:
1
2
3
4
5
6
7
8
9
10
15
20
25
30
35
40
space:
include
ignore
mode:
unified
ssdiff
stat only
author
Linquize <linquize@yahoo.com.hk>
2014-10-04 00:25:54 +0800
committer
Linquize <linquize@yahoo.com.hk>
2014-10-05 11:59:54 +0800
commit
67c44b7d27a15dd415651ccb9a2ad486a3738183
(
patch
)
tree
33f2133dc4535512e2e51da16aa79a08743bcba4
/
modules/git/version.go
parent
1126522a99e42039dcf3f3a1f6473797dd84b31f
(
diff
)
If git >= 2.0, sort tags in descending order by version number
Diffstat
(limited to 'modules/git/version.go')
-rw-r--r--
modules/git/version.go
4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/git/version.go b/modules/git/version.go
index 9908d11e..b535521e 100644
--- a/
modules/git/version.go
+++ b/
modules/git/version.go
@@ -74,6 +74,10 @@ func (v *Version) LessThan(that *Version) bool {
return v.Compare(that) < 0
}
+func (v *Version) AtLeast(that *Version) bool {
+ return v.Compare(that) >= 0
+}
+
// GetVersion returns current Git version installed.
func GetVersion() (*Version, error) {
if gitVer != nil {