bug in diff web view with lines starting with minus characters #308
Labels
No labels
accessibility
bug
bug
infrastructure
Codeberg
contributions welcome
docs
duplicate
enhancement
infrastructure
legal
licence / ToS
please chill
we are volunteers
public relations
question
question
user support
s/Forgejo
s/Forgejo/migration
s/Pages
s/Weblate
s/Woodpecker
security
service
upstream
wontfix
No milestone
No project
No assignees
6 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Codeberg/Community#308
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
In Lua, single line comments start with two minus characters
--. Codeberg's diff web view seems to have problems showing removed Lua comment lines that start at the first column. Added comment lines or comment lines starting with indentation seem not to be affected.Recipe:
The latter command shows correctly:
Watching the same commit at Codeberg,
sh2d/padrinoma@fb32cf2f69(scroll down to see filelua-modules/pdnm_nl_manipulation.lua) the removed comment line is missing (ln. 62).Guesswork: Problematic lines in the diff start with multiple minus characters
-. One minus character being diff's removed line indicator and two introducing a Lua comment.bug in diff web view with Lua commentsto bug in diff web view with lines starting with minus characters@sh2d did you create an issue upstream?
I think this is a regex issue in modules/git
@6543 Not yet. I'm just browsing the tracker. Hell, 1.300 open issues? Is that a software I wanna use? Quiet disappointing. Will add one more issue after I finished browsing.
:) yes. Check the rate of closed issues too ;)
Could anybody shed some light on how to find out the Gitea version Codeberg is running?
@sh2d It's explained at https://docs.codeberg.org/faq/ - currently it's
1.12.5+20-g7494b24c6By the way, you're right - Gitea is a bit of a bug-fest. But at the moment, it seems like it's the best alternative available for a project like Codeberg. And while the issue tracker seems to be overflowing, PRs seem to get processed quite quickly :)
@lhinderberger Ah, thank you! About the number of Gitea bugs, as @hw hinted to, last month saw more bugs closed than opened at least.
issues with bug lable:
138 open | 1394 closed😅 - gitea get a lot of feature requests too@sh2d gita's maintainer are now aware of this ... so keep clam and hope we find time to fix it 😓
One more observation, lines with leading plus sign characters are also affected. You can find a test repo at https://codeberg-test.org/sh2d/plus
Web view of commit
sh2d/plus@dd03689a37shows none of the removed/added lines containing the text "Starting with ...", but the change of the trailing line only.OK the cause of this is the incorrect parsing of the patch files in
services/gitdiff/gitdiff.go:449:ParsePatchIt's just wrong.
@zeripath rocks!
-> https://github.com/go-gitea/gitea/pull/13157
hehe :)
Cool, will watch the PR discussion, seems a bit too early to cherry pick, but the fix is near :)
Deployed!
@sh2d
Should be fixed
EDIT: Sorry it has not been merged in 1.13 yet, only 1.12 and master, codeberg-test.org runs 1.13-rc1+
@zeripath
This still looks broken though:sh2d/plus@dd03689a37The patch stats are ok now (2 lines changed) but the diff still misses one line afaics...Sorry, hit the wrong button.
@sh2d
It should be fixed on codeberg.org just not on codeberg-test.org, can you confirm?
The fix is now also deployed on codeberg-test.org!
I think this can be closed. @sh2d
I can confirm that I cannot reproduce the issue anymore. Another test commit
sh2d/padrinoma@0bdd9bbef5looks fine, too (cf. file examples/luatex/break-ligatures/pdnm_break-ligatures.lua).The thing is, I didn't wanted to close the issue myself, but was actually looking for a "discard" button. Closing the issue now.