Граф коммитов

224 Коммитов

Автор SHA1 Сообщение Дата
zeripath 63b74d438b
Backport of go-gitea/gitea#6555 (#152) 2019-04-11 18:08:47 +01:00
Segev Finer 21aca48d1a Update IsActive on Hook.Update (#151)
Signed-off-by: Segev Finer <segev@codeocean.com>
2019-03-26 18:55:21 +02:00
Richard Mahn ec4d631f8d Update MAINTAINERS (#150) 2019-03-21 11:50:13 -04:00
zeripath 74d7c14dd4
Fix panic on signed empty commit message (go-gitea/gitea#6292) (#149)
* Fix panic on signed empty commit message (go-gitea/gitea#6292)
2019-03-11 07:11:10 +00:00
Richard Mahn 6cba05a150 Fix for bad commitID to show up in error (#148)
* Fix for bad commitID to show up in error

* Adds test for repo_commit GetCommit

* Adds test if commitID is valid branch
2019-03-08 02:44:27 -05:00
Lunny Xiao 8983773ac6
fix bug when get tag id (#147)
* fix bug when get tag id

* fix wrong test

* use GetTagCommitID on getTag but not git command
2019-03-02 09:11:11 +08:00
John Olheiser e03eb393a2 Update MAINTAINERS (#146) 2019-02-19 19:20:23 +00:00
Lunny Xiao 2fa2b63334
add last commit cache interface (#144)
* add last commit cache interface

* fix tests
2019-02-12 19:00:42 +08:00
Lunny Xiao 0aea7f12d3 fix get tag list (#143) 2019-02-06 22:08:47 -05:00
Lanre Adelowo fbe468c7a6 get branch from commit sha1 (#142) 2019-02-03 23:53:29 +00:00
agrn d04f81a6f8 GetCommit() returns a ErrNotExist if short commit ID does not exists (#113)
* GetCommit() returns a ErrNotExist if short commit ID does not exists

Currently, GetCommit() returns a generic error if a short commit ID
does not exists in a repository.

When a commit is not found by git-rev-parse, it returns an errors
which contains "fatal: ambiguous argument". GetCommit() now search if
the error contains this string, and, if it does, returns an
ErrNotExist.

The idea is to allow commits to be accessed from gitea with a short
commit ID.  Without this change, it would return a 500 Internal Server
Error when a short ID does not exists in the repository.

Signed-off-by: Alban Gruin <alban@pa1ch.fr>

* GetCommit(): change the comparison for short commit messages

`fatal: ambiguous argument` can be the beginning of two errors in
git. This changes the comparison to something less ambiguous.

Signed-off-by: Alban Gruin <alban@pa1ch.fr>
2019-02-02 22:21:49 -05:00
Lunny Xiao 49292ad1fb fix submodule has port (#136) 2019-01-23 08:56:45 +02:00
Kasi Reddy 7d7fe9f83d Fixed a bug where TreeEntries were getting cached, (thanks @filipnavara) (#139) 2019-01-16 11:17:40 +08:00
Jonas Franz c811eb4fb0 Replace @JonasFranzDEV with @jonasfranz (#138)
* Replace @JonasFranzDEV with @jonasfranz

* Update MAINTAINERS file
2019-01-02 14:37:38 -05:00
Lunny Xiao b83e0a0712 Added commit file status, port from gogs (#137) 2018-12-31 17:33:52 -05:00
Michael Kuhn 389d3c803e command: fix NewCommand (#135)
Make an explicit copy of GlobalCommandArgs, otherwise append might
overwrite it.
2018-11-28 00:50:05 +02:00
Kasi Reddy 6b819173ed Improving / Exposing Git-Trees related features for Git-Trees API. (#123)
* Exposed TreeEntry.mode, changed EntryMode to hex.

* Added reference parsing (HEAD, HEAD~1, etc) for trees

* Added missing description

* Added Tree.ListEntriesRecursive() - utilizes the git ls-tree -r command
2018-11-26 10:36:10 +02:00
Lauris BH 578ad8f125 Refactor branch list using src-d/go-git and add GetRefs function (#133)
* Refactor branch list using src-d/go-git and add GetRefs function

* Fix copyright

* Fix to reuse ObjectType

* Add function to filter refs by prefix

* Fix import order

* Optimize if structure
2018-11-15 23:38:33 +01:00
Peter Hoffmann d945eda535 Blob api (#132)
* Add repo_blob

This adds a new Repository.GetBlob(id) method for use by gitea.

* This is a follow-up for PR #121 to implement blob_api including full test coverage

Signed-off-by: Berengar W. Lehr <Berengar.Lehr@kompetenztest.de>
2018-11-11 09:54:02 +02:00
kolaente f3afe30030 add myself to maintainers (#130) 2018-10-17 22:15:59 -04:00
Bo-Yi Wu ca75f901ad
fix golint path. (#131) 2018-10-18 10:15:04 +08:00
Christopher Medlin 6ef79e80b3 Add parsing support for tag GPG signatures (#124)
* Add parsing support for tag GPG signatures

* Test that signature is not left in commit message

* Fix object not found error in test
2018-07-08 13:38:27 +02:00
Alexey Terentyev 344971f642 Add myself as a maintainer (#126) 2018-07-01 09:08:26 +03:00
Lunny Xiao 9e09973fb8 Add codecov test coverage (#120) 2018-06-16 19:25:33 +08:00
Lauris BH 466ac2480d
Add function to resolve short commit ID to full SHA1 (#122)
* Add function to resolve short commit ID to full SHA1

* Add tests for GetFullCommitID
2018-06-12 12:45:55 +03:00
David Schneiderbauer 31f4b8e8c8 fix git version below 2.7 (#119)
* fix git version below 2.7

* fmt

* minor code improvement

* copyright + import order

* fmt
2018-05-26 13:17:21 +08:00
Jonas Franz 0077debc17 Fix blame problem for older git versions (#118) 2018-05-17 09:19:24 +08:00
Lunny Xiao 622cdd1472
Use dep instead of govendor (#117)
* use dep instead of govendor

* remove example

* change dependenci github.com/Unknwon from 1.0 to master
2018-05-15 23:26:52 +08:00
Jonas Franz 258a447de6 Add line blame (#116)
* Add line blame

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Use uint instead of int to prevent failures

Signed-off-by: Jonas Franz <info@jonasfranz.software>
2018-05-13 21:21:47 +08:00
Tris Forster f1ecc138be Fix for short symlinks (#115)
Signed-off-by: Tris Forster <tris.git@shoddynet.org>
2018-04-21 09:08:19 +08:00
Tris Forster 288aede62f Added FollowLink() method to TreeEntry (#114)
Signed-off-by: Tris Forster <tris.git@shoddynet.org>
2018-04-19 07:22:09 +03:00
Jonas Franz dac19864f4 Add myself as a maintainer (#112) 2018-03-16 21:51:01 +02:00
Ethan Koenig 3413a6c00a Simplify sha1 functions (#111) 2018-02-10 20:25:25 +02:00
Ethan Koenig 827f97aaaa Fix tree entry parsing (#110)
* Fix tree entry parsing

* nits

* populate TreeEntry.ptree
2018-02-09 21:05:43 -06:00
Lauris BH 6798d0f202
Make GetRefCommitID exported (#107) 2018-01-14 16:37:32 +02:00
Lunny Xiao f4a9105367
use io reader for GetFormatPatch (#105) 2018-01-07 00:11:05 -06:00
Lunny Xiao 2c3dc95a96 Set default command execution timeout as changable (#104)
* set default command execution timeout as changable

* fix lint
2018-01-07 11:10:22 +08:00
Morgan Bazalgette a34aca91dc add myself to maintainers (#106) 2018-01-06 22:07:53 +02:00
Sandro Santilli b3e9f251ec Add GetFormatPatch receiver for a repository (#103)
* Add GetFormatPatch receiver for a repository

Includes test

* Use binary for GetFormatPatch

Also add missing test file

* Add empty line
2018-01-05 20:55:23 +02:00
Bo-Yi Wu b8e87799dd
update LGTM pattern (#102) 2018-01-03 22:52:32 +08:00
Ethan Koenig 4ec3654064 Kill zombie subprocesses in GetCommitsInfo (#101) 2017-12-22 10:43:26 +08:00
Ethan Koenig 1aa1c8c087 Tests for GetComimitsInfo (#99) 2017-12-20 21:44:51 +02:00
Lunny Xiao 4573c63ec9
Fix retrieve file last commit branchName (#98)
* fix retrieve file last commit branchName

* fix test

* fix the commit cache and git log with specify branch or commit

* remove unused lock
2017-12-19 20:56:39 -06:00
David Schneiderbauer 4768133d10 Refactor CommitsBefore method to match github (#88)
* refactored CommitsBefore method

* add limit to getBranches

Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com>
2017-12-10 12:06:09 +02:00
Ethan Koenig c102502951 Fix time parsing (#97) 2017-12-10 12:04:04 +02:00
Ethan Koenig 02eccf8295 Faster commit lookup (#91)
* Faster commit lookup

* Fix copy/rename bug

* Comment

* Use defer
2017-12-10 12:02:18 +02:00
Duncan Ogilvie f9dd6826bb Improve memory usage for Blob.Data() by ~50% (#96)
Signed-off-by: Duncan Ogilvie <mr.exodia.tpodt@gmail.com>
2017-11-28 17:25:05 +02:00
Duncan Ogilvie 619663493e Improve memory usage in Commit.IsImageFile (#95)
Signed-off-by: Duncan Ogilvie <mr.exodia.tpodt@gmail.com>
2017-11-28 17:24:08 +02:00
Sandro Santilli c2040d5d4d Accept git 1.7.2 as the minimum version (#90)
* 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
2017-11-28 21:40:08 +08:00
Duncan Ogilvie 193e22ebec Introduce Blob.DataAsyc (#94)
Signed-off-by: Duncan Ogilvie <mr.exodia.tpodt@gmail.com>
2017-11-28 07:04:25 +02:00