Commit Graph

2025 Commits

Author SHA1 Message Date
Patrick Steinhardt
34c929572a version: bump version number to v0.27.10 2019-12-10 13:45:29 +01:00
Edward Thomson
3828d7afdd Release v0.27.9 2019-08-05 12:04:02 +01:00
Edward Thomson
703885a813 version: bump to v0.27.8 2019-01-25 17:44:51 +00:00
Carlos Martín Nieto
0573e78d2a refs: constify git_reference_peel
We have no need to take a non-const reference. This does involve some other work
to make sure we don't mix const and non-const variables, but by splitting what
we want each variable to do we can also simplify the logic for when we do want
to free a new reference we might have allocated.
2019-01-18 23:01:37 +00:00
Patrick Steinhardt
a0c286b5be version: bump to v0.27.7 2018-10-26 15:06:36 +02:00
Patrick Steinhardt
b699817848 version: bump to v0.27.6 2018-10-26 14:20:35 +02:00
Patrick Steinhardt
c590b41fe4 version: raise to v0.27.5 2018-10-05 13:22:09 +02:00
Patrick Steinhardt
c5dd0ea101 version: bump to v0.27.4 2018-08-06 08:50:01 +02:00
Patrick Steinhardt
8fbd756308 version: bump to v0.27.3 2018-07-05 14:34:24 +02:00
Patrick Steinhardt
853ef86acb version: bump soversion to v0.27.2 2018-06-06 13:56:06 +02:00
Patrick Steinhardt
df53ce3270 version: bump library version to 0.27.1 2018-05-29 18:59:56 +02:00
Carlos Martín Nieto
f907a6f5eb path: hide the dotgit file functions
These can't go into the public API yet as we don't want to introduce API or ABI
changes in a security release.
2018-05-29 13:44:35 +02:00
Carlos Martín Nieto
0cc1462722 path: add functions to detect .gitconfig and .gitattributes 2018-05-29 13:44:35 +02:00
Patrick Steinhardt
937e7e2640 Merge pull request #4544 from josharian/docs
pathspec: improve git_pathspec_flag_t doc rendering
2018-03-13 13:04:38 +00:00
Edward Thomson
358cc2e2ea Merge pull request #4396 from libgit2/cmn/config-regex-is-normalised
config: specify how we match the regular expressions
2018-03-12 09:50:00 +01:00
Carlos Martín Nieto
2f89bd90bc config: explicitly state that subsections are case-sensitive 2018-03-11 12:36:13 +01:00
Jacques Germishuys
5f6383ca50 diff: ensure an unsigned number is shifted 2018-03-08 08:17:29 +02:00
Jacques Germishuys
1235607648 worktree: lock reason should be const 2018-03-02 12:41:04 +02:00
Josh Bleecher Snyder
b72717b0de pathspec: improve git_pathspec_flag_t doc rendering
By placing docs per enum value rather than in a large block,
the automated doc generation tool can make nicer docs,
as could other automated tools, such as
the mooted https://github.com/libgit2/git2go/issues/427.

The current rendering is somewhat ugly:

https://libgit2.github.com/libgit2/#HEAD/type/git_pathspec_flag_t

No textual changes, just reorganization.
2018-02-23 08:19:49 -08:00
Patrick Steinhardt
23d4a91b4d Update version number to v0.27 2018-02-20 16:49:39 +00:00
Edward Thomson
97f9a5f0bc odb: provide length and type with streaming read
The streaming read functionality should provide the length and the type
of the object, like the normal read functionality does.
2018-02-01 16:35:49 -08:00
Edward Thomson
9d8510b3be Merge pull request #4488 from libgit2/ethomson/conflict_marker_size
Use longer conflict markers in recursive merge base
2018-01-31 09:28:43 -08:00
Adrián Medraño Calvo
d23ce18710 odb: export mempack backend
Fixes #4492, #4496.
2018-01-22 11:55:28 +01:00
Edward Thomson
b8e9467a4b merge: allow custom conflict marker size
Allow for a custom conflict marker size, allowing callers to override
the default size of the "<<<<<<<" and ">>>>>>>" markers in the
conflicted output file.
2018-01-21 11:18:25 +00:00
Carlos Martín Nieto
dcb668bac3 message: update docs for git_message_prettify
We used to hard-code the octothorpe as the comment character and the
documentation still mentions this even though we accept the comment character as
a parameter.

Update the line to indicate this and clean up the first paragraph a bit.
2018-01-19 01:11:37 +00:00
Brian Lopez
4893a9c01c Merge pull request #4451 from libgit2/charliesome/trailer-info
Implement message trailer parsing API
2018-01-17 13:54:42 -08:00
Brian Lopez
3e5239e42a update code docs 2018-01-16 23:55:46 -08:00
Brian Lopez
d43974fb5c Change trailer API to return a simple array 2018-01-16 19:33:04 -08:00
Patrick Steinhardt
5963292f9e refs: document need to free refs in foreach-callback
References passed to the callback function of `git_reference_foreach`
are expected to be owned by the callback. As such, they are never being
freed by `git_reference_foreach`, but will have to be freed by the
caller. This small detail is never mentioned in the function's
documentation, though, making it easy to get wrong. Document this to
make it discoverable.
2018-01-12 13:13:57 +00:00
Brian Lopez
5734768b9e Merge remote-tracking branch 'origin/master' into charliesome/trailer-info 2018-01-10 19:19:34 -08:00
Brian Lopez
fb29ba0953 remove empty lines between @-lines 2018-01-03 18:32:09 -08:00
Brian Lopez
e8bc855834 Merge remote-tracking branch 'origin/master' into charliesome/trailer-info 2018-01-02 13:29:49 -08:00
Edward Thomson
346c1b169d docs: git_treebuilder_insert validates entries
The documentation for `git_treebuilder_insert` erroneously states that
we do not validate that the entry being inserted exists.  We do, as of
https://github.com/libgit2/libgit2/pull/3633.  Update the documentation
to reflect the new reality.
2017-12-31 09:25:42 -06:00
Edward Thomson
d621024508 Merge pull request #4159 from richardipsum/notes-commit
Support using notes via a commit rather than a ref
2017-12-30 13:09:43 -06:00
Charlie Somerville
1c43edca1f message: add routine for parsing trailers from messages
This is implemented in trailer.c and borrows a large amount of logic
from Git core to ensure compatibility.
2017-12-19 15:01:48 +11:00
Edward Thomson
429bb35754 Merge pull request #4318 from Uncommon/amend_status
Add git_status_file_at
2017-12-01 11:45:53 +00:00
David Catmull
4ccacdc8ec status: Add a baseline field to git_status_options for comparing to trees other than HEAD 2017-11-30 07:59:45 -07:00
apnadkarni
d439fb20bc Include git2/worktree.h in git2.h
I'm not sure if worktree.h was intentionally left out of git2.h. Looks like an oversight since it is in fact documented.
2017-11-25 15:48:03 +05:30
Carlos Martín Nieto
7e3faf58cb diff: expose the "indent heuristic" in the diff options
We default to off, but we might want to consider changing `GIT_DIFF_NORMAL` to
include it.
2017-11-19 08:20:18 +01:00
Carlos Martín Nieto
158a42a550 config: specify how we match the regular expressions
We do it the same as git does: case-sensitively on the normalized form of the
variable name.

While here also specify that we're case-sensitive on the values when handling
the values when setting or deleting multivars.
2017-11-18 19:27:24 +01:00
Henry Kleynhans
f063dafb1d signature: distinguish +0000 and -0000 UTC offsets
Git considers '-0000' a valid offset for signature lines.  They need to
be treated as _not_ equal to a '+0000' signature offset.  Parsing a
signature line stores the offset in a signed integer which does not
distinguish between `+0` and `-0`.

This patch adds an additional flag `sign` to the `git_time` in the
`signature` object which is populated with the sign of the offset.  In
addition to exposing this information to the user, this information is
also used to compare signatures.

/cc @pks-t @ethomson
2017-11-12 12:01:10 +00:00
Ken Dreyer
38169764fd describe.h: fix spelling in comments
optios -> options
2017-11-10 16:19:39 -07:00
Patrick Steinhardt
529e873cef config: pass repository when opening config files
Our current configuration logic is completely oblivious of any
repository, but only cares for actual file paths. Unfortunately, we are
forced to break this assumption by the introduction of conditional
includes, which are evaluated in the context of a repository. Right now,
only one conditional exists with "gitdir:" -- it will only include the
configuration if the current repository's git directory matches the
value passed to "gitdir:".

To support these conditionals, we have to break our API and make the
repository available when opening a configuration file. This commit
extends the `open` call of configuration backends to include another
repository and adjusts existing code to have it available. This includes
the user-visible functions `git_config_add_file_ondisk` and
`git_config_add_backend`.
2017-10-09 11:19:42 +02:00
Patrick Steinhardt
d02cf564a0 repository: constify several repo parameters for getters
Several functions to retrieve variables from a repository only return
immutable values, which allows us to actually constify the passed-in
repository parameter. Do so to help a later patch, which will only have
access to a constant repository.
2017-10-09 11:19:42 +02:00
Richard Ipsum
60bee89d46 notes: Add git_note_commit_iterator_new
This also adds tests for this function.
2017-10-07 00:43:40 +01:00
Richard Ipsum
9a02725d11 notes: Add git_note_commit_remove
This also adds tests for this function.
2017-10-07 00:43:29 +01:00
Richard Ipsum
7096bf1ef6 notes: Add git_note_commit_read
This also adds tests for this function.
2017-10-07 00:33:23 +01:00
Richard Ipsum
a46e743d01 notes: Add git_note_commit_create
This adds a new function that will allow creation of notes without
necessarily updating a particular ref, the notes tree is obtained
from the git_commit object parameter, a new commit object pointing
to the current tip of the notes tree is optionally returned
via the 'note_commit_out' parameter,
optionally the blob id for the note is returned through
the 'note_blob_out' object.
2017-10-07 00:31:54 +01:00
Carson Howard
7138ce370b remote: add typedef to normalize push_update_reference callback
Very many callbacks in libgit2 have some sort of typedef to normalize the name at git_<name_of_operation>_cb. Add a typedef for push_update_references in the remote so the name follows the same conventions.
2017-10-06 07:16:26 -07:00
Jacob Wahlgren
56ac6c0a4b graph: document that a commit isn't a descendant of itself 2017-10-06 14:33:16 +02:00