-
-
Notifications
You must be signed in to change notification settings - Fork 6k
Add inline commit coments #35240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add inline commit coments #35240
Conversation
A quick look, still many problems:
So overall it doesn't look good enough. If it can continue, please review the changed code line by line and add necessary tests. (by the way: I only take a quick look for the code, I haven't really thought about whether the design is feasible). |
5e92a99
to
9025105
Compare
models/git/commit.go
Outdated
Line int64 | ||
FileName string | ||
CommitSHA string `xorm:"VARCHAR(64)"` | ||
Attachments string `xorm:"JSON TEXT"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the design how to cooperate with attachment table? The attachment maybe GC because all foreign indexes are zero?
And there is an edge case, if a commit was GC, the commit comments and related attachments, reactions need to be deleted as well. |
The fixes are not right. You shouldn't use a global variable like I don't know whether the code is written by you or by AI, but overall, it doesn't look right. Too many problems in code, and it's impossible to review. I would suggest you to #4898 (comment) :
|
How could a global variable be right for the persistent data? How to handle instance restart? How to handle more than one instances in a cluster? |
No, it is definitely wrong.
I would reiterate my suggestion again: it is not an easy task, please study Gitea's code carefully and start from small PRs (some good first issues) before proposing such a large PR if you are new to the code base. |
If you are interested in the "editor draft" topic, you can read my another issue: [Summary] Improve issue/PR comment editing experience #23290 |
Gitea's session data is stored in persistence storage (file) by default installation. And there are many providers, only the "memory" provider doesn't persist the session data. gitea/routers/install/install.go Line 449 in 1740d36
gitea/custom/conf/app.example.ini Lines 1909 to 1911 in 1740d36
|
I have spent enough time on reviewing this PR and arguing about the details, and it seems that you have your own strong opinions. I have suggested many times: start from some easy tasks and get familiar with the code base first. And sorry I don't understand what your "approach" would be. So I can't comment more. |
Questions:
|
Thank you for the update but sorry it looks wrong. At the moment I don't have time and can't help more. |
77918a4
to
e96ef97
Compare
Adds inline comments to commits. Inline commit comments can be considered new feature and does not use the existing
functionality of comments, issues or attachments.
/claim #4898