1
0
mirror of https://github.com/go-gitea/git.git synced 2026-02-05 06:45:03 +01:00

28 Commits

Author SHA1 Message Date
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
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
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
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
Lauris BH
6798d0f202 Make GetRefCommitID exported (#107) 2018-01-14 16:37:32 +02: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
David Schneiderbauer
576fbdd4d3 remove unnecessary version checks
Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com>
2017-10-11 17:50:48 +02:00
Philippe Kueck
5b41327cca use --follow on file history to show log across renames (#37)
* use --follow on file history to show log across renames

* revert changes in commitsByRange
2017-03-21 08:52:03 +08:00
Antoine GIRARD
337468881d Add GPG payload to commit information if present (#36)
* Add GPG payload to commit information if present

based on : 3bc53220cb/commit.c (L1128)

* Fix missing data in payload + leading space in Signature
2017-03-13 23:07:03 +08:00
Zsombor
dd951bf625 Add ability to search for commit messages in all the branches (#31) 2017-02-05 10:50:57 +08:00
Lunny Xiao
38a5ca6b26 change returned unexported types to exported types 2016-11-16 15:14:36 +08:00
Lunny Xiao
167a0ba929 golint fixed current -min_confidence=0.9 2016-11-13 12:42:56 +08:00
Unknwon
7b206b529a Return ErrNotExist when ref is not valid 2016-08-19 08:31:25 -07:00
Unknwon
2a820b5471 Detect and return ErrNotFound when get commit 2016-08-15 15:25:13 -07:00
Unknwon
db93fa5501 gogits/gogs#2586 better approach to prevent iterate all commits 2016-07-12 06:18:28 +08:00
Odin Ugedal
1f1117c396 Add support for abbreviated commit IDs (#10)
Support shorter commit IDs than 40 characters
2016-06-02 18:16:23 -07:00
Richard Mahn
0888f003de Added functions to handle checking out branches and moving files (#12)
* Adds functions to handle checking out branches and moving files

Adds support for checking out a new branch
Fix for branch pull requests

* Adds methods to get files changes between two commits
2016-06-01 01:24:11 -07:00
Adam Strzelecki
d78e7eee65 Fix regression causing no submodule info
This fixes regression introduced in ebd9fb2253,
that GetSubModules was always returning empty submodule info because
c.submoduleCache != nil check was always true since parseCommitData was setting
commit.submoduleCache = newObjectCache() so it was always not-nil.

Now we initialize submoduleCache in first GetSubModules call, next call will
return cached entries.
2016-01-13 18:48:32 +01:00
Unknwon
081966e117 gogits/gogs#2373 500 when filename starts with ':' 2016-01-11 14:59:01 +08:00
Unknwon
2a390aed4d support pure tag 2015-12-14 09:27:18 -05:00
Unknwon
ebd9fb2253 speed up for getting a lot commits 2015-12-13 22:57:47 -05:00
Unknwon
1ffc4bc36d readboferelimit 2015-12-10 16:28:22 -05:00
Unknwon
4cc1cbbfea complete migration from gogs module 2015-12-09 20:45:25 -05:00
Unknwon
19510da781 more helpers 2015-11-27 02:15:42 -05:00
Unknwon
e97767e2eb migrate some commands 2015-11-27 00:24:02 -05:00