[PATCH 0/4] Add stat only diff mode

2014-10-05 Thread John Keeping
This series extends the diff type combobox to include a new stat only mode, which outputs only the stat section of the diff. The first two patches are preparatory cleanups to remove some references to the existing ssdiff flag, then we change that flag to an enum in patch 3 and add the stat only

[PATCH 1/4] ui-shared: remove toggle_ssdiff arg to cgit_commit_link()

2014-10-05 Thread John Keeping
This argument is never used with a value other than zero, so remove it and simplify the code. Signed-off-by: John Keeping j...@keeping.me.uk --- ui-commit.c | 4 ++-- ui-log.c| 4 ++-- ui-refs.c | 2 +- ui-shared.c | 11 +-- ui-shared.h | 3 +-- 5 files changed, 11

[PATCH 2/4] ui-shared: remove toggle_ssdiff arg to cgit_diff_link()

2014-10-05 Thread John Keeping
This argument is never used with a value other than zero, so remove it and simplify the code. Signed-off-by: John Keeping j...@keeping.me.uk --- ui-commit.c | 2 +- ui-diff.c | 4 ++-- ui-shared.c | 8 ui-shared.h | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git

[PATCH 3/4] Change ss diff flag to an enum

2014-10-05 Thread John Keeping
This will allow us to introduce a new stat only diff mode without needing an explosion of mutually incompatible flags. The old ss query parameter is still accepted in order to avoid breaking saved links, but we no longer generate any URIs using it; instead the new dt (diff type) parameter is

[PATCH 4/4] ui-diff: add stat only diff type

2014-10-05 Thread John Keeping
This prints the diffstat but stops before printing (or generating) any of the body of the diff. No cgitrc option is added here so that we can wait to see how useful this is before letting people set it as the default. Suggested-by: Konstantin Ryabitsev mri...@kernel.org Signed-off-by: John

Fwd: JSON interface

2014-10-05 Thread Wilhelm Matilainen
Instead of acting as a server providing html and css files, could there be a only-json option? I could then provide all the static files minified and cached from a proper http server already in use and request only the data from cgit. Using jquery: ---

Re: Fwd: JSON interface

2014-10-05 Thread John Keeping
On Sun, Oct 05, 2014 at 02:13:35PM +0300, Wilhelm Matilainen wrote: Instead of acting as a server providing html and css files, could there be a only-json option? You can already configure the URL for CGit's CSS and logo files to point at a separate machine if you want to do that. I could

Re: Fwd: JSON interface

2014-10-05 Thread Wilhelm Matilainen
That's what I'm interested in doing. There just has to be some reverse proxied application that will handle the requests to git with security in mind. 2014-10-05 15:05 GMT+03:00 John Keeping j...@keeping.me.uk: On Sun, Oct 05, 2014 at 02:13:35PM +0300, Wilhelm Matilainen wrote: Instead of