This repository has been archived on 2024-01-04. You can view files and clone it, but cannot push or open issues or pull requests.
forgejo/modules/git
zeripath 20c2bdf86b
Ensure BlameReaders close at end of request (#12102) (#12103)
Backport #12102

this was thought to be due to timeouts, however on closer look this
appears to be due to the Close() function of the BlameReader hanging
with a blocked stdout pipe.

This PR fixes this Close function to:

* Cancel the context of the cmd
* Close the StdoutReader - ensuring that the output pipe is closed

Further it makes the context of the `git blame` command a child of the
request context - ensuring that even if Close() is not called, on
cancellation of the Request the blame is command will also be cancelled.

Fixes #11716
Closes #11727

Signed-off-by: Andrew Thornton <art27@cantab.net>
2020-07-01 18:43:25 +03:00
..
pipeline
tests/repos
blame.go Ensure BlameReaders close at end of request (#12102) (#12103) 2020-07-01 18:43:25 +03:00
blame_test.go Ensure BlameReaders close at end of request (#12102) (#12103) 2020-07-01 18:43:25 +03:00
blob.go Migrate to go-git/go-git v5.0.0 (#10735) 2020-03-17 12:19:58 -04:00
blob_test.go
cache.go Migrate to go-git/go-git v5.0.0 (#10735) 2020-03-17 12:19:58 -04:00
command.go Refactor Cron and merge dashboard tasks (#10745) 2020-05-16 19:31:38 -04:00
command_test.go
commit.go Allow compare page to look up base, head, own-fork, forkbase-of-head (#11327) 2020-05-12 08:52:46 +03:00
commit_archive.go Make archive prefixing configurable with a global setting (#9943) 2020-01-22 23:46:46 +00:00
commit_info.go Migrate to go-git/go-git v5.0.0 (#10735) 2020-03-17 12:19:58 -04:00
commit_info_test.go Add gitea-vet (#10948) 2020-04-05 07:20:50 +01:00
commit_reader.go Migrate to go-git/go-git v5.0.0 (#10735) 2020-03-17 12:19:58 -04:00
commit_test.go
diff.go Some refactor on git diff and ignore getting commit information failed on migrating pull request review comments (#9996) 2020-01-28 08:02:03 +00:00
diff_test.go Some refactor on git diff and ignore getting commit information failed on migrating pull request review comments (#9996) 2020-01-28 08:02:03 +00:00
error.go Handle push rejection in branch and upload (#10854) 2020-03-28 01:13:18 -03:00
git.go Refactor Cron and merge dashboard tasks (#10745) 2020-05-16 19:31:38 -04:00
git_test.go
hook.go
notes.go Migrate to go-git/go-git v5.0.0 (#10735) 2020-03-17 12:19:58 -04:00
notes_test.go
parse.go Migrate to go-git/go-git v5.0.0 (#10735) 2020-03-17 12:19:58 -04:00
parse_test.go Migrate to go-git/go-git v5.0.0 (#10735) 2020-03-17 12:19:58 -04:00
README.md
ref.go
repo.go Handle push rejection in branch and upload (#10854) 2020-03-28 01:13:18 -03:00
repo_attribute.go
repo_blame.go
repo_blob.go Migrate to go-git/go-git v5.0.0 (#10735) 2020-03-17 12:19:58 -04:00
repo_blob_test.go
repo_branch.go Migrate to go-git/go-git v5.0.0 (#10735) 2020-03-17 12:19:58 -04:00
repo_branch_test.go
repo_commit.go Handle more pathological branch and tag names (#11843) (#11863) 2020-06-12 14:01:44 -04:00
repo_commit_test.go
repo_commitgraph.go Migrate to go-git/go-git v5.0.0 (#10735) 2020-03-17 12:19:58 -04:00
repo_compare.go Allow compare page to look up base, head, own-fork, forkbase-of-head (#11327) 2020-05-12 08:52:46 +03:00
repo_compare_test.go
repo_gpg.go
repo_hook.go
repo_index.go
repo_language_stats.go For language detection do not try to analyze big files by content (#11971) (#11975) 2020-06-19 13:10:03 +03:00
repo_object.go
repo_ref.go Migrate to go-git/go-git v5.0.0 (#10735) 2020-03-17 12:19:58 -04:00
repo_ref_test.go
repo_stats.go Add top author stats to activity page (#9615) 2020-01-20 12:07:30 +02:00
repo_stats_test.go Add top author stats to activity page (#9615) 2020-01-20 12:07:30 +02:00
repo_tag.go Migrate to go-git/go-git v5.0.0 (#10735) 2020-03-17 12:19:58 -04:00
repo_tag_test.go [API] enable paggination for ListRepoTags (#10454) 2020-02-25 14:07:07 -05:00
repo_test.go
repo_tree.go
sha1.go [API] Get a single commit via Ref (#10915) 2020-04-07 22:54:46 -04:00
signature.go Migrate to go-git/go-git v5.0.0 (#10735) 2020-03-17 12:19:58 -04:00
submodule.go Manage port in submodule refurl (#11305) 2020-05-07 11:25:52 -03:00
submodule_test.go Fix submodule paths when AppSubUrl is not root (#11098) 2020-04-22 11:34:50 +01:00
tag.go
tree.go Migrate to go-git/go-git v5.0.0 (#10735) 2020-03-17 12:19:58 -04:00
tree_blob.go Migrate to go-git/go-git v5.0.0 (#10735) 2020-03-17 12:19:58 -04:00
tree_entry.go Migrate to go-git/go-git v5.0.0 (#10735) 2020-03-17 12:19:58 -04:00
tree_entry_test.go Migrate to go-git/go-git v5.0.0 (#10735) 2020-03-17 12:19:58 -04:00
utils.go Fix ref links in issue overviews for tags (#8742) 2020-05-14 18:55:43 -04:00
utils_test.go Fix ref links in issue overviews for tags (#8742) 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.