Age | Commit message (Collapse) | Author |
|
Update to git version v2.46.0, this requires changes for these
upstream commits:
* e7da9385708accf518a80a1e17969020fb361048
global: introduce `USE_THE_REPOSITORY_VARIABLE` macro
* 9da95bda74cf10e1475384a71fd20914c3b99784
hash: require hash algorithm in `oidread()` and `oidclr()`
* 30aaff437fddd889ba429b50b96ea4c151c502c5
refs: pass repo when peeling objects
* c8f815c2083c4b340d4148a15d45c55f2fcc7d3f
refs: remove functions without ref store
Signed-off-by: Christian Hesse <mail@eworm.de>
|
|
Update to git version v2.41.0, with lots of changes...
This requires changes for these upstream commits:
* 60ff56f50372c1498718938ef504e744fe011ffb
banned.h: mark `strtok()` and `strtok_r()` as banned
* 52acddf36c8cb3778ab2098a0d95cc2e375a4069
string-list: multi-delimiter `string_list_split_in_place()`
* d850b7a545fcfbd97460a921c7f7c59d933eb0f7
cocci: apply the "cache.h" part of "the_repository.pending"
* cb338c23d6d518947bf6f7240bf30e2ec232bd3b
cocci: apply the "commit-reach.h" part of "the_repository.pending"
* ecb5091fd4301ac647db0bd2504112b38f7ee06d
cocci: apply the "commit.h" part of "the_repository.pending"
* 085390328f5fe1dfba67039b1fd6cc51546a4e41
cocci: apply the "diff.h" part of "the_repository.pending"
* bc726bd075929aab6b3e09d4dd5c2b0726fd5350
cocci: apply the "object-store.h" part of "the_repository.pending"
* bab821646a74c446370fa8d01ca851f247df5033
cocci: apply the "pretty.h" part of "the_repository.pending"
* afe27c889429438829bc8818ed17e4960bd3ef02
cocci: apply the "packfile.h" part of "the_repository.pending"
* 12cb1c10a64170a5d600dd1c6c8abfeec105fb6b
cocci: apply the "refs.h" part of "the_repository.pending"
* 035c7de9e9ea11d26df5f9e4bb117f91ed11a9fd
cocci: apply the "revision.h" part of "the_repository.pending"
... and some more I missed to list 😜 - for example the move and cleanup
of headers and includes (see changes in `cgit.h`) comes to mind...
Signed-off-by: Christian Hesse <mail@eworm.de>
|
|
Instead of calling two separate Git functions to free memory associated
with a commit object, use Git's wrapper which does this. This also
counts as a potential future bug fix since release_commit_memory() also
resets the parsed state of the commit, meaning any attempt to use it in
the future will correctly fill out the fields again.
release_commit_memory() does not set parents to zero, so keep that for
additional safety in case CGit checks this without calling
parse_commit() again.
Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
|
Fixes several RFC 4287 violations:
> 4.1.1. The "atom:feed" Element
> o atom:feed elements MUST contain exactly one atom:id element.
> o atom:feed elements SHOULD contain one atom:link element with a rel
> attribute value of "self". This is the preferred URI for
> retrieving Atom Feed Documents representing this Atom feed.
> o atom:feed elements MUST contain exactly one atom:updated element.
An atom:id element is generated from cgit_currentfullurl(), and an
atom:link element with a rel attribute of "self" is generated with
the same URL. An atom:updated element is generated from the date
of the first commit in the revision walk.
> 4.1.2. The "atom:entry" Element
> o atom:entry elements MUST NOT contain more than one atom:content
> element.
The second atom:content element with the type of "xhtml" is removed.
> 4.2.6. The "atom:id" Element
> Its content MUST be an IRI, as defined by [RFC3987]. Note that the
> definition of "IRI" excludes relative references. Though the IRI
> might use a dereferencable scheme, Atom Processors MUST NOT assume it
> can be dereferenced.
The atom:id elements for commits now use URNs in the "sha1" or
"sha256" namespaces. Although these are not registered URN namespaces,
they see use in the wild, for instance as part of magnet URIs.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
|
Update to git version v2.21.0. Required changes follow upstream commits:
* 6a7895fd8a3bd409f2b71ffc355d5142172cc2a0
(commit: prepare free_commit_buffer and release_commit_memory for
any repo)
* e092073d643b17c82d72cf692fbfaea9c9796f11
(tree.c: make read_tree*() take 'struct repository *')
Signed-off-by: Christian Hesse <mail@eworm.de>
Reviewed-by: John Keeping <john@keeping.me.uk>
|
|
Signed-off-by: Christian Hesse <mail@eworm.de>
|
|
If the delimiter here is '&' then it needs to be escaped for inclusion
in an attribute. Use html_attrf() to ensure that this happens (we know
that hex won't need escaping, but this makes it clearer what's
happening.
Signed-off-by: John Keeping <john@keeping.me.uk>
|
|
Git's DATE_STRFTIME ignores the timezone argument and just uses the
local timezone regardless of whether the "local" flag is set.
Since Atom accepts ISO8601 dates [1], we can use Git's
DATE_ISO8601_STRICT instead, which does get this right. Additionally,
we never use the local timezone here so we can use the
date_mode_from_type() wrapper to simplify the code a bit.
[1] https://tools.ietf.org/html/rfc4287#section-3.3
Signed-off-by: John Keeping <john@keeping.me.uk>
|
|
This will allow us to remove cgit_print_date and use Git's show_date
consistently.
Signed-off-by: John Keeping <john@keeping.me.uk>
|
|
Update to git version v2.7.0.
* Upstream commit ed1c9977cb1b63e4270ad8bdf967a2d02580aa08 (Remove
get_object_hash.) changed API:
Convert all instances of get_object_hash to use an appropriate
reference to the hash member of the oid member of struct object.
This provides no functional change, as it is essentially a macro
substitution.
Signed-off-by: Christian Hesse <mail@eworm.de>
|
|
Coverity-id: 13945
Signed-off-by: Christian Hesse <mail@eworm.de>
|
|
Coverity-id: 13946
Signed-off-by: Christian Hesse <mail@eworm.de>
|
|
Coverity-id: 13947
Signed-off-by: Christian Hesse <mail@eworm.de>
|
|
This is slightly more involved than just bumping the version number
because it pulls in a change to convert the commit buffer to a slab,
removing the "buffer" field from "struct commit". All sites that access
"commit->buffer" have been changed to use the new functions provided for
this purpose.
Signed-off-by: John Keeping <john@keeping.me.uk>
|
|
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>
|
|
* Name "cgit Development Team" as copyright holder to avoid listing
every single developer.
* Update copyright ranges.
Signed-off-by: Lukas Fleischer <cgit@crytocrack.de>
|
|
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>
|
|
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>
|
|
Spotted by parsing the output of `gcc -Wmissing-prototypes [...]`.
Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de>
|
|
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>
|
|
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>
|
|
|
|
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>
|
|
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>
|
|
Signed-off-by: Martin Szulecki <opensuse@sukimashita.com>
|
|
|
|
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>
|