gitea/modules/git
zeripath 6e4480835f
Fix issue with DiffIndex on initial commit ()
Unfortunately  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 

Closes 

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-Authored-By: L0veSunshine <xuan199651@gmail.com>
..
pipeline
tests/repos
README.md
blame.go
blame_test.go
blob.go Migrate to go-git/go-git v5.0.0 ()
blob_test.go
cache.go Migrate to go-git/go-git v5.0.0 ()
command.go Refactor Cron and merge dashboard tasks ()
command_test.go
commit.go Properly handle and return empty string for dangling commits in GetBranchName ()
commit_archive.go
commit_info.go Migrate to go-git/go-git v5.0.0 ()
commit_info_test.go Add gitea-vet ()
commit_reader.go Migrate to go-git/go-git v5.0.0 ()
commit_test.go
diff.go
diff_test.go
error.go Handle push rejection in branch and upload ()
git.go Refactor Cron and merge dashboard tasks ()
git_test.go
hook.go
notes.go Migrate to go-git/go-git v5.0.0 ()
notes_test.go
parse.go Migrate to go-git/go-git v5.0.0 ()
parse_test.go Migrate to go-git/go-git v5.0.0 ()
ref.go
repo.go Handle push rejection in branch and upload ()
repo_attribute.go
repo_blame.go
repo_blob.go Migrate to go-git/go-git v5.0.0 ()
repo_blob_test.go
repo_branch.go Migrate to go-git/go-git v5.0.0 ()
repo_branch_test.go
repo_commit.go Add push commits history comment on PR time-line ()
repo_commit_test.go
repo_commitgraph.go Migrate to go-git/go-git v5.0.0 ()
repo_compare.go Fix numbr of files, total additions, and deletions ()
repo_compare_test.go
repo_gpg.go
repo_hook.go
repo_index.go
repo_language_stats.go Exclude generated files from language statistics ()
repo_object.go
repo_ref.go Migrate to go-git/go-git v5.0.0 ()
repo_ref_test.go
repo_stats.go
repo_stats_test.go
repo_tag.go Migrate to go-git/go-git v5.0.0 ()
repo_tag_test.go
repo_test.go
repo_tree.go
sha1.go Fix issue with DiffIndex on initial commit ()
signature.go Migrate to go-git/go-git v5.0.0 ()
submodule.go Manage port in submodule refurl ()
submodule_test.go Fix submodule paths when AppSubUrl is not root ()
tag.go
tree.go Migrate to go-git/go-git v5.0.0 ()
tree_blob.go Migrate to go-git/go-git v5.0.0 ()
tree_entry.go Migrate to go-git/go-git v5.0.0 ()
tree_entry_test.go Migrate to go-git/go-git v5.0.0 ()
utils.go Fix ref links in issue overviews for tags ()
utils_test.go Fix ref links in issue overviews for tags ()

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.