tomaswolf / gerrit-gitblit-plugin

Integrates standard GitBlit (currently 1.7.1) as a repository viewer in Gerrit
Apache License 2.0
22 stars 5 forks source link

Allow user or admin to set the number of lines of context when doing a diff #13

Closed lscarval closed 8 years ago

lscarval commented 8 years ago

The default behavior is to show the diff and 3 lines of context only.

For most of the commits 3 lines are not enough. Many times, it is difficult to grasp the change with such a small diff context.

Please, consider adding a some sort of visual setting that allows the user to set the number of context lines.

If that's not possible, than consider adding an option to set something in a config file that the Gerrit admin can set, which would still be fixed, but could be set at a higher number.

Thanks a lot!

tomaswolf commented 8 years ago

That's Gitblit core functionality. As far as I see, Gitblit always uses the (default) seting of 3 lines.

A visual way to change that would have to be done in Gitblit itself -- unless I'm missing something, it doesn't have that yet. Maybe a user preference -- but it looks like I'll have to revisit user preferences anyway; looks like they don't save...

A configuration setting would be a much less invasive change that I could do in the Gerrit plugin itself, but it's sub-optimal, as it would be a global setting for everyone everywhere.

I'll see what I can do with reasonable effort.

tomaswolf commented 8 years ago

You might want to give release v2.12.162.2 a try. It re-uses the Gerrit preference for the number of context lines in Gitblit diffs.

If it works for you, I'll promote that release from "pre-release" to a proper release.

tomaswolf commented 8 years ago

I guess no news is good news. Promoted the release.

lscarval commented 8 years ago

Thanks. It looks fine to me On Jan 21, 2016 3:24 PM, "tomaswolf" notifications@github.com wrote:

Closed #13 https://github.com/tomaswolf/gerrit-gitblit-plugin/issues/13.

— Reply to this email directly or view it on GitHub https://github.com/tomaswolf/gerrit-gitblit-plugin/issues/13#event-522216602 .