forgejo/modules/git
zeripath 6e4480835f
Fix issue with DiffIndex on initial commit (#11677)
Unfortunately #11614 introduced a bug whereby the initial commit of a
repository could not be seen due to there being no parent commit to
create a clear diff from.

Here we create a diffstat from the difference between the parentless SHA and the SHA of the empty tree - a constant known to git. (With thanks to @L0veSunshine for informing me of this SHA)

Thanks to @a1012112796 for initial attempt to fix.

Fix #11650

Closes #11674

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-Authored-By: L0veSunshine <xuan199651@gmail.com>
2020-05-29 22:14:00 +01:00
..
pipeline
tests/repos
blame.go
blame_test.go
blob.go
blob_test.go
cache.go
command.go Refactor Cron and merge dashboard tasks (#10745) 2020-05-16 19:31:38 -04:00
command_test.go
commit.go Properly handle and return empty string for dangling commits in GetBranchName (#11587) 2020-05-23 20:49:48 +01:00
commit_archive.go
commit_info.go
commit_info_test.go
commit_reader.go
commit_test.go
diff.go
diff_test.go
error.go
git.go Refactor Cron and merge dashboard tasks (#10745) 2020-05-16 19:31:38 -04:00
git_test.go
hook.go
notes.go
notes_test.go
parse.go
parse_test.go
README.md
ref.go
repo.go
repo_attribute.go
repo_blame.go
repo_blob.go
repo_blob_test.go
repo_branch.go
repo_branch_test.go
repo_commit.go Add push commits history comment on PR time-line (#11167) 2020-05-20 09:47:24 -03:00
repo_commit_test.go
repo_commitgraph.go
repo_compare.go Fix numbr of files, total additions, and deletions (#11614) 2020-05-26 01:58:07 -04:00
repo_compare_test.go
repo_gpg.go
repo_hook.go
repo_index.go
repo_language_stats.go Exclude generated files from language statistics (#11653) 2020-05-29 09:20:01 +03:00
repo_object.go
repo_ref.go
repo_ref_test.go
repo_stats.go
repo_stats_test.go
repo_tag.go
repo_tag_test.go
repo_test.go
repo_tree.go
sha1.go Fix issue with DiffIndex on initial commit (#11677) 2020-05-29 22:14:00 +01:00
signature.go
submodule.go Manage port in submodule refurl (#11305) 2020-05-07 11:25:52 -03:00
submodule_test.go
tag.go
tree.go
tree_blob.go
tree_entry.go
tree_entry_test.go
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.