1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-09-01 14:56:30 +00:00
gitea/modules/git
zeripath 101fb0d7e2
Do not assume all 40 char strings are SHA1s () ()
Backport 

GetCommit() assumes that all 40 char strings are SHA1s. This leads to an
error if you try to do a PR on a branch which is 40 characters long.

This PR attempts the SHA first - and if it fails will switch to using rev-parse.

Fix 

Signed-off-by: Andrew Thornton <art27@cantab.net>
2021-02-14 01:25:47 +08:00
..
pipeline Add basic repository lfs management () 2019-10-28 18:31:55 +00:00
tests/repos Fix reading git notes from nested trees () 2019-09-12 09:14:41 +08:00
blame_test.go Ensure BlameReaders close at end of request () 2020-07-01 14:01:17 +01:00
blame.go Prevent panic on git blame by limiting lines to 4096 bytes at most () 2020-11-10 08:00:20 +00:00
blob_test.go Add Close() method to gogitRepository () 2019-11-13 07:01:19 +00:00
blob.go Migrate to go-git/go-git v5.0.0 () 2020-03-17 12:19:58 -04:00
cache.go Migrate to go-git/go-git v5.0.0 () 2020-03-17 12:19:58 -04:00
command_test.go Fix nondeterministic behavior () 2019-12-13 17:03:38 +08:00
command.go Always wait for the cmd to finish () () 2020-12-17 21:06:51 +01:00
commit_archive.go Set context for running CreateArchive in to that of the request () 2020-08-28 09:55:12 +03:00
commit_info_test.go Re-attempt to delete temporary upload if the file is locked by another process () 2020-08-11 21:05:34 +01:00
commit_info.go Cache last commit when pushing for big repository () 2020-10-09 01:17:23 +03:00
commit_reader.go Migrate to go-git/go-git v5.0.0 () 2020-03-17 12:19:58 -04:00
commit_test.go move code.gitea.io/git to code.gitea.io/gitea/modules/git () 2019-03-27 17:33:00 +08:00
commit.go [Vendor] Switch go-version lib () 2020-09-05 12:42:58 -04:00
diff_test.go Some refactor on git diff and ignore getting commit information failed on migrating pull request review comments () 2020-01-28 08:02:03 +00:00
diff.go Some refactor on git diff and ignore getting commit information failed on migrating pull request review comments () 2020-01-28 08:02:03 +00:00
error.go Handle push rejection in branch and upload () 2020-03-28 01:13:18 -03:00
git_test.go Graceful: Xorm, RepoIndexer, Cron and Others () 2019-12-15 09:51:28 +00:00
git.go Migrations: Use Process Manager to create own Context () 2020-12-02 15:11:11 -06:00
hook.go Update golangci-lint to version 1.31.0 () 2020-10-11 21:27:20 +01:00
notes_test.go Add Close() method to gogitRepository () 2019-11-13 07:01:19 +00:00
notes.go Cache last commit when pushing for big repository () 2020-10-09 01:17:23 +03:00
parse_test.go Migrate to go-git/go-git v5.0.0 () 2020-03-17 12:19:58 -04:00
parse.go Migrate to go-git/go-git v5.0.0 () 2020-03-17 12:19:58 -04:00
README.md move code.gitea.io/git to code.gitea.io/gitea/modules/git () 2019-03-27 17:33:00 +08:00
ref.go move code.gitea.io/git to code.gitea.io/gitea/modules/git () 2019-03-27 17:33:00 +08:00
repo_attribute.go [Vendor] Switch go-version lib () 2020-09-05 12:42:58 -04:00
repo_blame.go Removed unnecessary conversions () 2019-07-23 19:50:39 +01:00
repo_blob_test.go Add Close() method to gogitRepository () 2019-11-13 07:01:19 +00:00
repo_blob.go Migrate to go-git/go-git v5.0.0 () 2020-03-17 12:19:58 -04:00
repo_branch_test.go Add Close() method to gogitRepository () 2019-11-13 07:01:19 +00:00
repo_branch.go Adopt repositories () 2020-09-25 07:09:23 +03:00
repo_commit_test.go Add Close() method to gogitRepository () 2019-11-13 07:01:19 +00:00
repo_commit.go Do not assume all 40 char strings are SHA1s () () 2021-02-14 01:25:47 +08:00
repo_commitgraph.go Migrate to go-git/go-git v5.0.0 () 2020-03-17 12:19:58 -04:00
repo_compare_test.go Re-attempt to delete temporary upload if the file is locked by another process () 2020-08-11 21:05:34 +01:00
repo_compare.go Git 2.28 no longer permits diff with ... on unrelated branches () 2020-07-29 13:53:04 -04:00
repo_gpg.go Sign merges, CRUD, Wiki and Repository initialisation with gpg key () 2019-10-16 14:42:42 +01:00
repo_hook.go move code.gitea.io/git to code.gitea.io/gitea/modules/git () 2019-03-27 17:33:00 +08:00
repo_index.go Be more strict with git arguments () 2019-08-05 21:39:39 +01:00
repo_language_stats.go Use enry language type to detect special languages () 2020-06-19 15:24:03 +03:00
repo_object.go Fixes - API File Contents bug () 2019-06-29 16:51:10 -04:00
repo_ref_test.go Add Close() method to gogitRepository () 2019-11-13 07:01:19 +00:00
repo_ref.go Migrate to go-git/go-git v5.0.0 () 2020-03-17 12:19:58 -04:00
repo_stats_test.go Add top author stats to activity page () 2020-01-20 12:07:30 +02:00
repo_stats.go refactor repo_stats to use os.pipe () 2020-09-05 16:12:14 -04:00
repo_tag_test.go Re-attempt to delete temporary upload if the file is locked by another process () 2020-08-11 21:05:34 +01:00
repo_tag.go [Vendor] Switch go-version lib () 2020-09-05 12:42:58 -04:00
repo_test.go Add Close() method to gogitRepository () 2019-11-13 07:01:19 +00:00
repo_tree.go Add configurable Trust Models () 2020-09-20 00:44:55 +08:00
repo.go Migrations: Use Process Manager to create own Context () 2020-12-02 15:11:11 -06:00
sha1.go Fix issue with DiffIndex on initial commit () 2020-05-29 22:14:00 +01:00
signature.go Migrate to go-git/go-git v5.0.0 () 2020-03-17 12:19:58 -04:00
submodule_test.go Compare SSH_DOMAIN when parsing submodule URLs () 2020-09-07 20:08:10 -04:00
submodule.go Compare SSH_DOMAIN when parsing submodule URLs () 2020-09-07 20:08:10 -04:00
tag.go Fixes - Adds the /git/tags API endpoint () 2019-06-08 17:31:11 +03:00
tree_blob.go Fix 500 on README in submodule () 2020-10-02 09:27:44 -04:00
tree_entry_test.go Migrate to go-git/go-git v5.0.0 () 2020-03-17 12:19:58 -04:00
tree_entry.go Migrate to go-git/go-git v5.0.0 () 2020-03-17 12:19:58 -04:00
tree.go Migrate to go-git/go-git v5.0.0 () 2020-03-17 12:19:58 -04:00
utils_test.go Fix ref links in issue overviews for tags () 2020-05-14 18:55:43 -04:00
utils.go Fix ref links in issue overviews for tags () 2020-05-14 18:55:43 -04:00

Git Module

This module is merged from https://github.com/go-gitea/git which is a Go module to access Git through shell commands. Now it's a part of gitea's main repository for easier pull request.