Commit Graph

13 Commits (f60ffa143cca61e9729ac71033e1a556cf422871)

Author SHA1 Message Date
Lukas Fleischer f60ffa143c Switch to exclusively using global ctx
Drop the context parameter from the following functions (and all static
helpers used by them) and use the global context instead:

* cgit_print_http_headers()
* cgit_print_docstart()
* cgit_print_pageheader()

Remove context parameter from all commands

Drop the context parameter from the following functions (and all static
helpers used by them) and use the global context instead:

* cgit_get_cmd()
* All cgit command functions.
* cgit_clone_info()
* cgit_clone_objects()
* cgit_clone_head()
* cgit_print_plain()
* cgit_show_stats()

In initialization routines, use the global context variable instead of
passing a pointer around locally.

Remove callback data parameter for cache slots

This is no longer needed since the context is always read from the
global context variable.

Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de>
10 years ago
Lukas Fleischer f7f26f8875 Update copyright information
* Name "cgit Development Team" as copyright holder to avoid listing
  every single developer.

* Update copyright ranges.

Signed-off-by: Lukas Fleischer <cgit@crytocrack.de>
10 years ago
John Keeping 8f20879431 Always #include corresponding .h in .c files
While doing this, remove declarations from header files where the
corresponding definition is declared "static" in order to avoid build
errors.

Also re-order existing headers in ui-*.c so that the file-specific
header always comes immediately after "cgit.h", helping with future
consistency.

Signed-off-by: John Keeping <john@keeping.me.uk>
11 years ago
Lukas Fleischer 996f86e664 Return const char * in cgit_{httpscheme, hosturl, rooturl}()
The return values of these functions are essentially constant and should
never be modified.

Note that this will introduce a compiler warning when we try to free the
return value of any of these functions. However, given that all of these
currently return statically allocated strings in some cases, they need
to be refactored before this can be done anyway.

Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de>
11 years ago
Lukas Fleischer bafab423f2 Mark several functions/variables static
Spotted by parsing the output of `gcc -Wmissing-prototypes [...]`.

Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de>
11 years ago
Lars Hjemli cda1b78ff7 Append path and branch to atom feed title
Currently all atom feeds for a repository get the same title but they
are actually unique per path and per branch.

Signed-off-by: Chris Mayo <aklhfex@gmail.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years ago
Chris Mayo eca95229ac Use committer date for atom feed entry updated element
Committer date reflects the most recent change and is used for ordering
the log page (author date is still available in published element of the
feed entry).

Signed-off-by: Chris Mayo <aklhfex@gmail.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years ago
Lars Hjemli 9043b46f85 Merge branch 'stable' 14 years ago
Aaron Griffin aaa3f78542 RSS items should always use UTC times
The format uses a 'Z' suffix, which indicates no TZ offset.
Thus we should not respect the local-time config setting here.

Signed-off-by: Aaron Griffin <agriffin@datalogics.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years ago
Aaron Griffin 65ced7c009 Add all=1 query param for atom feeds
Displays all items from all branches in one feed

Signed-off-by: Aaron Griffin <agriffin@datalogics.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years ago
Martin Szulecki 2f56e390f0 Introduce noplainemail option to hide email adresses from spambots
Signed-off-by: Martin Szulecki <opensuse@sukimashita.com>
15 years ago
Diego Ongaro 694dd43886 use cgit_httpscheme() for atom feed 15 years ago
Lars Hjemli b2a3d31e88 Add atom-support
This enables a page which generates atom feeds for the current branch and
path, heavily inspired by the atom-support in gitweb.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years ago