Closed zTrix closed 8 years ago
what you mean by simple? need any more features or just optimize UI?
A more user-friendly git diff page, like gitlab or github, with color support, line number, single file view/split view.
got it
Highlight completed.
TODO:
https://raw.githubusercontent.com/jay/showlinenum/develop/showlinenum.awk here is a sample of adding line number, yet it needs shell so it is not a good solution. We might have to modify the git2go package.
Emm, don't use shell and awk...
found XSS vulnerability in diff page
But we do not have a account system.. 2333
BTW, what's the vulnerability you found?
Both "line number" and "single file view/split view" features needs to modify backend, libgit2
How does gitlab/gogs/gitup implement the diff function?
gitlab: generated by backend gogs: generated by backend
https://github.com/gogits/gogs/blob/3a81fdf092a39cc94f3bb896a42db8546bd5f39a/models/git_diff.go https://github.com/gogits/gogs/blob/0af035c37e8b561662c93b163b3294b91be6ffac/templates/repo/diff_box.tmpl code from gogs
invoke Process and call git seems totaly not safe yet the only solution...
how does Reviewable generate the diff page?
open source?
I don't think so. But it seems to be generating diff on front end.
https://github.com/chaitin/strapdown-zeta/pull/89
with diff2html
Current diff page is tooooooo simple!