Skip to content

Conversation

@zeripath
Copy link
Contributor

Use diff --shortstat to generate number of files, total additions and deletions on diff pages generated from git pages.

Signed-off-by: Andrew Thornton [email protected]

@zeripath zeripath added this to the 1.13.0 milestone May 24, 2020
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 24, 2020
@zeripath zeripath force-pushed the fix-diff-number-of-files-adds-dels branch from 498d71c to 8325613 Compare May 25, 2020 10:02
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels May 25, 2020
Copy link
Member

@techknowlogick techknowlogick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🏅 👏

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels May 26, 2020
@techknowlogick
Copy link
Member

ping LG-TM

@techknowlogick techknowlogick merged commit 5cb201d into go-gitea:master May 26, 2020
@zeripath zeripath deleted the fix-diff-number-of-files-adds-dels branch May 26, 2020 06:07
zeripath added a commit to zeripath/gitea that referenced this pull request May 29, 2020
Unfortunately go-gitea#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 ensure that the index is empty by referring to a non-existent
file and the create a diffstat from the difference between it and the
parentless SHA.

Fix go-gitea#11650

Signed-off-by: Andrew Thornton <[email protected]>
zeripath added a commit that referenced this pull request May 29, 2020
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 <[email protected]>
Co-Authored-By: L0veSunshine <[email protected]>
ydelafollye pushed a commit to ydelafollye/gitea that referenced this pull request Jul 31, 2020
ydelafollye pushed a commit to ydelafollye/gitea that referenced this pull request Jul 31, 2020
Unfortunately go-gitea#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 go-gitea#11650

Closes go-gitea#11674

Signed-off-by: Andrew Thornton <[email protected]>
Co-Authored-By: L0veSunshine <[email protected]>
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants