Skip to content
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

Default to histogram diff algorithm #23255

Closed
Maxattax97 opened this issue Mar 2, 2023 · 2 comments · Fixed by #24860
Closed

Default to histogram diff algorithm #23255

Maxattax97 opened this issue Mar 2, 2023 · 2 comments · Fixed by #24860
Labels
type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@Maxattax97
Copy link

Feature Description

Compelling research exists to suggest that the histogram diff algorithm is much superior to myers. This makes diffs smaller and easier to read in various edge cases. If histogram is not available, patience is close but less performant.

https://link.springer.com/article/10.1007/s10664-019-09772-z

If this request is denied, could you please advise how to alter a server setup to use this? i.e., which .gitconfig file should I change?

Screenshots

No response

@Maxattax97 Maxattax97 added type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first. labels Mar 2, 2023
@silverwind
Copy link
Member

This was discussed in the past in #20467 and I generally think it is a welcome change.

In which git version was histogram introduced?

Actual change can be done around here: https://github.com/go-gitea/gitea/blob/main/modules/git/git.go#L205.

@Maxattax97
Copy link
Author

@silverwind 🍰 #23257

silverwind added a commit that referenced this issue May 23, 2023
…stogram` by default (#24860)

Close #13454 , Close #23255, Close #14697 (and maybe more related
issues)

Many users have the requirement to customize the git config. This PR
introduces an easy way: put the options in Gitea's app.ini
`[git.config]`, then the config options will be applied to git config.

And it can support more flexible default config values, eg: now
`diff.algorithm=histogram` by default. According to:
https://stackoverflow.com/a/32367597/4754037 , `histogram diff` is
efficient and doesn't like to cause server-side problems.

---------

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
Co-authored-by: Giteabot <teabot@gitea.io>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
2 participants