You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/modules/git
zeripath 320031fce6
Handle more pathological branch and tag names (#11843) (#11863)
Backport #11843

It's possible to push quite pathological appearing branch names to gitea
using git push gitea reasonable-branch:refs/heads/-- at which point
large parts of the UI will break. Similarly you can git push origin
reasonable-tag:refs/tags/-- which wil return an error.

This PR fixes the problems these cause. It also changes the code from
creating branches to pushing to ensure that branch restoration has to
pass hooks.

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
5 years ago
..
pipeline Add basic repository lfs management (#7199) 5 years ago
tests/repos Fix reading git notes from nested trees (#8026) 6 years ago
README.md move code.gitea.io/git to code.gitea.io/gitea/modules/git (#6364) 6 years ago
blame.go Graceful: Cancel Process on monitor pages & HammerTime (#9213) 5 years ago
blame_test.go Monitor all git commands; move blame to git package and replace git as a variable (#6864) 6 years ago
blob.go Migrate to go-git/go-git v5.0.0 (#10735) 5 years ago
blob_test.go Add Close() method to gogitRepository (#8901) 5 years ago
cache.go Migrate to go-git/go-git v5.0.0 (#10735) 5 years ago
command.go Refactor Cron and merge dashboard tasks (#10745) 5 years ago
command_test.go Fix nondeterministic behavior (#9341) 5 years ago
commit.go Allow compare page to look up base, head, own-fork, forkbase-of-head (#11327) 5 years ago
commit_archive.go Make archive prefixing configurable with a global setting (#9943) 5 years ago
commit_info.go Migrate to go-git/go-git v5.0.0 (#10735) 5 years ago
commit_info_test.go Add gitea-vet (#10948) 5 years ago
commit_reader.go Migrate to go-git/go-git v5.0.0 (#10735) 5 years ago
commit_test.go move code.gitea.io/git to code.gitea.io/gitea/modules/git (#6364) 6 years ago
diff.go Some refactor on git diff and ignore getting commit information failed on migrating pull request review comments (#9996) 5 years ago
diff_test.go Some refactor on git diff and ignore getting commit information failed on migrating pull request review comments (#9996) 5 years ago
error.go Handle push rejection in branch and upload (#10854) 5 years ago
git.go Refactor Cron and merge dashboard tasks (#10745) 5 years ago
git_test.go Graceful: Xorm, RepoIndexer, Cron and Others (#9282) 5 years ago
hook.go fix 500 when edit hook (#8782) 5 years ago
notes.go Migrate to go-git/go-git v5.0.0 (#10735) 5 years ago
notes_test.go Add Close() method to gogitRepository (#8901) 5 years ago
parse.go Migrate to go-git/go-git v5.0.0 (#10735) 5 years ago
parse_test.go Migrate to go-git/go-git v5.0.0 (#10735) 5 years ago
ref.go move code.gitea.io/git to code.gitea.io/gitea/modules/git (#6364) 6 years ago
repo.go Handle push rejection in branch and upload (#10854) 5 years ago
repo_attribute.go Make repository management section handle lfs locks (#8726) 5 years ago
repo_blame.go Removed unnecessary conversions (#7557) 6 years ago
repo_blob.go Migrate to go-git/go-git v5.0.0 (#10735) 5 years ago
repo_blob_test.go Add Close() method to gogitRepository (#8901) 5 years ago
repo_branch.go Migrate to go-git/go-git v5.0.0 (#10735) 5 years ago
repo_branch_test.go Add Close() method to gogitRepository (#8901) 5 years ago
repo_commit.go Handle more pathological branch and tag names (#11843) (#11863) 5 years ago
repo_commit_test.go Add Close() method to gogitRepository (#8901) 5 years ago
repo_commitgraph.go Migrate to go-git/go-git v5.0.0 (#10735) 5 years ago
repo_compare.go Allow compare page to look up base, head, own-fork, forkbase-of-head (#11327) 5 years ago
repo_compare_test.go Remove SavePatch and generate patches on the fly (#9302) 5 years ago
repo_gpg.go Sign merges, CRUD, Wiki and Repository initialisation with gpg key (#7631) 6 years ago
repo_hook.go move code.gitea.io/git to code.gitea.io/gitea/modules/git (#6364) 6 years ago
repo_index.go Be more strict with git arguments (#7715) 6 years ago
repo_language_stats.go Change language statistics to save size instead of percentage (#11681) (#11690) 5 years ago
repo_object.go Fixes #7292 - API File Contents bug (#7301) 6 years ago
repo_ref.go Migrate to go-git/go-git v5.0.0 (#10735) 5 years ago
repo_ref_test.go Add Close() method to gogitRepository (#8901) 5 years ago
repo_stats.go Add top author stats to activity page (#9615) 5 years ago
repo_stats_test.go Add top author stats to activity page (#9615) 5 years ago
repo_tag.go Migrate to go-git/go-git v5.0.0 (#10735) 5 years ago
repo_tag_test.go [API] enable paggination for ListRepoTags (#10454) 5 years ago
repo_test.go Add Close() method to gogitRepository (#8901) 5 years ago
repo_tree.go Sign merges, CRUD, Wiki and Repository initialisation with gpg key (#7631) 6 years ago
sha1.go [API] Get a single commit via Ref (#10915) 5 years ago
signature.go Migrate to go-git/go-git v5.0.0 (#10735) 5 years ago
submodule.go Manage port in submodule refurl (#11305) 5 years ago
submodule_test.go Fix submodule paths when AppSubUrl is not root (#11098) 5 years ago
tag.go Fixes #2738 - Adds the /git/tags API endpoint (#7138) 6 years ago
tree.go Migrate to go-git/go-git v5.0.0 (#10735) 5 years ago
tree_blob.go Migrate to go-git/go-git v5.0.0 (#10735) 5 years ago
tree_entry.go Migrate to go-git/go-git v5.0.0 (#10735) 5 years ago
tree_entry_test.go Migrate to go-git/go-git v5.0.0 (#10735) 5 years ago
utils.go Fix ref links in issue overviews for tags (#8742) 5 years ago
utils_test.go Fix ref links in issue overviews for tags (#8742) 5 years ago

README.md

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.