Skip to content
This repository was archived by the owner on Apr 12, 2019. It is now read-only.

Panic if Git version is < GitVersionRequired #46

Merged
merged 3 commits into from
Apr 19, 2017

Conversation

cez81
Copy link

@cez81 cez81 commented Apr 18, 2017

Panic during init() if Git version is < GitVersionRequired.
I have set the min version to 1.7.10 as required by SetDefaultBranch (https://github.com/go-gitea/git/blob/master/repo_branch.go#L58). I'm not sure why 1.7.10 is required for SetDefaultBranch, symbolic-ref has been in there for a while https://git-scm.com/docs/git-symbolic-ref/1.4.4.

Ref: go-gitea/gitea#1133

@lunny
Copy link
Member

lunny commented Apr 18, 2017

build failed

@appleboy
Copy link
Member

LGTM

@strk
Copy link
Member

strk commented Apr 18, 2017

LGTM

git.go Outdated
@@ -1,4 +1,5 @@
// Copyright 2015 The Gogs Authors. All rights reserved.
// Copyright 2017 The Gogs Authors. All rights reserved.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be Gitea for 2017 ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@sapk
Copy link
Member

sapk commented Apr 18, 2017

PR is good but it seems LGTM is broken ?

@strk
Copy link
Member

strk commented Apr 18, 2017

LGTM bot is just slow sometimes, anyway PR is now ready to merge (although still w/out a unit test)

@appleboy appleboy merged commit ee1a397 into go-gitea:master Apr 19, 2017
@cez81 cez81 deleted the git_module_panic branch April 19, 2017 05:19
@strk
Copy link
Member

strk commented Nov 11, 2017

The arbitrary version number check does not allow running Gitea on Debian 6, please review #90 to also accept 1.7.0 instead

bkcsoft pushed a commit that referenced this pull request Nov 23, 2017
Debian old old (very old) distribution (6.0 aka Squeeze)
ships version 1.7.10.4.

The version requirement was raised in #46 supposedly for the
need of "symbolic-ref" command, but that command is supported
by the 1.7 version too, and even older versions.
lunny pushed a commit that referenced this pull request Nov 28, 2017
* Add an head ref for the sake of using self repo for testing

* Add test for CommitCount

* Add testing with git-1.7.2

* Add test for GetLatestCommitTime

The test checks that latest commit time is before now
and more recent than the commit this PR is based at
Test no error is raised by time parsing and GetLatestCommitTime
Print actual time when tests fail

* Accept git 1.7.2 as the minimum version

Debian old old (very old) distribution (6.0 aka Squeeze)
ships version 1.7.10.4.

The version requirement was raised in #46 supposedly for the
need of "symbolic-ref" command, but that command is supported
by the 1.7.2 version too, and possibly even older versions.

* Reduce output from drone, add comments

Reduce steps, concatenating them in logical steps

* Interrupt step upon first failure

* Add Dockerfile for use with ci

* Use ad-hoc docker image for testing git-1.7.2

* Avoid running build/vet/clean twice

* Set HEAD ref also in testing-1-7 step
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants