Commit Graph

19 Commits

Author SHA1 Message Date
Lauris BH 43c09134a9
Migrate to go-git/go-git v5.0.0 (#10735) 2020-03-17 12:19:58 -04:00
6543 4427a936b4
[API] enable paggination for ListRepoTags (#10454)
* enable paggination for repoTags

* precalculate first, cut slice second

* Apply suggestions from code review

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>

Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
2020-02-25 14:07:07 -05:00
guillep2k 4cb1bdddc8 Strict name matching for Repository.GetTagID() (#8074)
* Strict name matching for Repository.GetTagID()

* Perform make swagger-check swagger-validate vendor

* Add test for GetTagID()
2019-09-04 08:48:17 +03:00
Richard Mahn 3302066f69 Fixes #7945 - makes sure we are only getting tag refs (#7990) 2019-08-26 23:11:24 -04:00
zeripath 7ad67109d7
Be more strict with git arguments (#7715)
* Be more strict with git arguments
* fix-up commit test
* use bindings for branch name
2019-08-05 21:39:39 +01:00
Richard Mahn 567e117df8 Fixes #7238 - Annotated tag commit ID incorrect (#7321)
* Fixes #7238 - Annotated tag commit ID incorrect

* Fixes #7238 - Annotated tag commit ID incorrect
2019-06-29 11:44:17 +01:00
kolaente f9ec2f89f2 Add golangci (#6418) 2019-06-12 15:41:28 -04:00
Richard Mahn 8de0b0a3f0 Fixes #2738 - Adds the /git/tags API endpoint (#7138)
* Fixes #2738 - /git/tags API

* proper URLs

* Adds function comments

* Updates swagger

* Removes newline from tag message

* Removes trailing newline from commit message

* Adds integration test

* Removed debugging

* Adds tests

* Fixes bug where multiple tags of same commit show wrong tag name

* Fix formatting

* Removes unused varaible

* Fix to annotated tag function names and response

* Update modules/git/repo_tag.go

Co-Authored-By: Lauris BH <lauris@nix.lv>

* Uses TagPrefix

* Changes per review, better error handling for getting tag and commit IDs

* Fix to getting commit ID

* Fix to getting commit ID

* Fix to getting commit ID

* Fix to getting commit ID
2019-06-08 17:31:11 +03:00
Filip Navara 2af67f6044 Improve listing performance by using go-git (#6478)
* Use go-git for tree reading and commit info lookup.

Signed-off-by: Filip Navara <navara@emclient.com>

* Use TreeEntry.IsRegular() instead of ObjectType that was removed.

Signed-off-by: Filip Navara <navara@emclient.com>

* Use the treePath to optimize commit info search.

Signed-off-by: Filip Navara <navara@emclient.com>

* Extract the latest commit at treePath along with the other commits.

Signed-off-by: Filip Navara <navara@emclient.com>

* Fix listing commit info for a directory that was created in one commit and never modified after.

Signed-off-by: Filip Navara <navara@emclient.com>

* Avoid nearly all external 'git' invocations when doing directory listing (.editorconfig code path is still hit).

Signed-off-by: Filip Navara <navara@emclient.com>

* Use go-git for reading blobs.

Signed-off-by: Filip Navara <navara@emclient.com>

* Make SHA1 type alias for plumbing.Hash in go-git.

Signed-off-by: Filip Navara <navara@emclient.com>

* Make Signature type alias for object.Signature in go-git.

Signed-off-by: Filip Navara <navara@emclient.com>

* Fix GetCommitsInfo for repository with only one commit.

Signed-off-by: Filip Navara <navara@emclient.com>

* Fix PGP signature verification.

Signed-off-by: Filip Navara <navara@emclient.com>

* Fix issues with walking commit graph across merges.

Signed-off-by: Filip Navara <navara@emclient.com>

* Fix typo in condition.

Signed-off-by: Filip Navara <navara@emclient.com>

* Speed up loading branch list by keeping the repository reference (and thus all the loaded packfile indexes).

Signed-off-by: Filip Navara <navara@emclient.com>

* Fix lising submodules.

Signed-off-by: Filip Navara <navara@emclient.com>

* Fix build

Signed-off-by: Filip Navara <navara@emclient.com>

* Add back commit cache because of name-rev

Signed-off-by: Filip Navara <navara@emclient.com>

* Fix tests

Signed-off-by: Filip Navara <navara@emclient.com>

* Fix code style

* Fix spelling

* Address PR feedback

Signed-off-by: Filip Navara <navara@emclient.com>

* Update vendor module list

Signed-off-by: Filip Navara <navara@emclient.com>

* Fix getting trees by commit id

Signed-off-by: Filip Navara <navara@emclient.com>

* Fix remaining unit test failures

* Fix GetTreeBySHA

* Avoid running `git name-rev` if not necessary

Signed-off-by: Filip Navara <navara@emclient.com>

* Move Branch code to git module

* Clean up GPG signature verification and fix it for tagged commits

* Address PR feedback (import formatting, copyright headers)

* Make blob lookup by SHA working

* Update tests to use public API

* Allow getting content from any type of object through the blob interface

* Change test to actually expect the object content that is in the GIT repository

* Change one more test to actually expect the object content that is in the GIT repository

* Add comments
2019-04-19 20:17:27 +08:00
Lunny Xiao d578b71d61
move code.gitea.io/git to code.gitea.io/gitea/modules/git (#6364)
* move code.gitea.io/git to code.gitea.io/gitea/modules/git

* fix imports

* fix fmt

* fix misspell

* remove wrong tests data

* fix unit tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* enable Debug to trace the failure tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* comment commit count tests since git clone depth is 50

* fix tests

* update from code.gitea.io/git

* revert change to makefile
2019-03-27 17:33:00 +08:00
Unknwon 9a2e43bff2 move out git module and #1573 send push hook 2015-12-09 20:46:05 -05:00
Unknwon 3a81fdf092 rename fields 2015-11-03 22:49:06 -05:00
Unknwon 7372042441 list view: issue, label, milestone 2015-08-09 22:45:38 +08:00
Unknwon 6f8e388b55 fix #1169
- prevent create reop on existed path
2015-07-26 19:22:17 +08:00
Linquize 67c44b7d27 If git >= 2.0, sort tags in descending order by version number 2014-10-05 11:59:54 +08:00
Unknwon 2a031c1365 Fix #515 2014-09-30 04:39:53 -04:00
Unknwon ebb05475ed Fix #495 and cannot view repository by tag 2014-09-23 13:06:25 -04:00
Unknwon 5c4bc3c848 Huge updates!!!!! Be careful to merge!!!! 2014-07-26 02:28:04 -04:00
Unknwon 8dd07c0ddd New UI merge in progress 2014-07-26 00:24:27 -04:00