|
f0e693b1
|
2021-09-07T17:53:49
|
|
str: introduce `git_str` for internal, `git_buf` is external
libgit2 has two distinct requirements that were previously solved by
`git_buf`. We require:
1. A general purpose string class that provides a number of utility APIs
for manipulating data (eg, concatenating, truncating, etc).
2. A structure that we can use to return strings to callers that they
can take ownership of.
By using a single class (`git_buf`) for both of these purposes, we have
confused the API to the point that refactorings are difficult and
reasoning about correctness is also difficult.
Move the utility class `git_buf` to be called `git_str`: this represents
its general purpose, as an internal string buffer class. The name also
is an homage to Junio Hamano ("gitstr").
The public API remains `git_buf`, and has a much smaller footprint. It
is generally only used as an "out" param with strict requirements that
follow the documentation. (Exceptions exist for some legacy APIs to
avoid breaking callers unnecessarily.)
Utility functions exist to convert a user-specified `git_buf` to a
`git_str` so that we can call internal functions, then converting it
back again.
|
|
168fe39b
|
2018-11-28T14:26:57
|
|
object_type: use new enumeration names
Use the new object_type enumeration names within the codebase.
|
|
8455a270
|
2018-07-01T12:04:27
|
|
tests: add missing cl_git_pass to tests
Reported by Coverity, CID 1393678-1393697.
|
|
ecf4f33a
|
2018-02-08T11:14:48
|
|
Convert usage of `git_buf_free` to new `git_buf_dispose`
|
|
6abdf52d
|
2016-03-07T09:37:51
|
|
merge::workdir::dirty: update to use `st_ctime_nsec`
Update unit test to use newfangled `st_ctime_nsec`, which provides
indirection to the platform-correct name.
|
|
35439f59
|
2016-02-11T12:24:21
|
|
win32: introduce p_timeval that isn't stupid
Windows defines `timeval` with `long`, which we cannot
sanely cope with. Instead, use a custom timeval struct.
|
|
263e674e
|
2016-02-11T11:41:23
|
|
merge tests: correct casts
|
|
e9e6df2c
|
2015-06-15T09:28:55
|
|
cmake: Only provide USE_NSEC if struct stat members are avilable.
This allows us to remove OS checks from source code, instead relying
on CMake to detect whether or not `struct stat` has the nanoseconds
members we rely on.
|
|
e7de893e
|
2015-06-01T13:43:54
|
|
cmake: add USE_NSEC, and only check nanosec m/ctime if enabled
|
|
5b05f954
|
2015-06-20T13:17:06
|
|
merge: work around write-side racy protection when hacking the index
As we attempt to replicate a situation in which an older checkout has
put a file on disk with different filtering settings from us, set the
timestamp on the entry and file to a second before we're performing the
operation so the entry in the index counts as old.
This way we can test that we're not looking at the on-disk file when the
index has the entry and we detect it as clean.
|
|
fef5344c
|
2015-06-16T16:34:25
|
|
merge::workdir::dirty: tick idx to defeat racy-git
|
|
23a17803
|
2015-01-07T14:16:50
|
|
reset: remove reflog message override
This function is meant to simulate what git does in the reset command,
so we should include the reflog message in that.
|
|
659cf202
|
2015-01-07T12:23:05
|
|
Remove the signature from ref-modifying functions
The signature for the reflog is not something which changes
dynamically. Almost all uses will be NULL, since we want for the
repository's default identity to be used, making it noise.
In order to allow for changing the identity, we instead provide
git_repository_set_ident() and git_repository_ident() which allow a user
to override the choice of signature.
|
|
18b00406
|
2014-10-03T19:02:29
|
|
s/git_merge_head/git_annotated_commit
Rename git_merge_head to git_annotated_commit, as it becomes used
in more operations than just merge.
|
|
b8add6c4
|
2014-08-03T15:44:13
|
|
Allow to propagate checkout callbacks to git HARD reset
Signed-off-by: Sven Strickroth <email@cs-ware.de>
|
|
967f5a76
|
2014-05-23T14:50:51
|
|
git_checkout_index: checkout other indexes
git_checkout_index can now check out other git_index's (that are not
necessarily the repository index). This allows checkout_index to use
the repository's index for stat cache information instead of the index
data being checked out. git_merge and friends now check out their
indexes directly instead of trying to blend it into the running index.
|
|
a4e2c36a
|
2014-04-23T19:40:21
|
|
merge: checkout default shouldn't clobber given
|
|
26564d80
|
2014-04-23T19:26:58
|
|
merge: default checkout strategy for should be SAFE
|
|
d9fdee6e
|
2014-03-12T09:43:53
|
|
Remove `git_merge_result` as it's now unnecessary
|
|
5aa2ac6d
|
2014-03-11T22:47:39
|
|
Update git_merge_tree_opts to git_merge_options
|
|
02105a27
|
2014-03-11T18:40:38
|
|
Change signature of `git_merge` to take merge and checkout opts
|
|
5c8be325
|
2014-02-05T13:32:45
|
|
Fix a few references to changed function signatures
|
|
bb13d391
|
2014-02-01T12:51:44
|
|
Test that emulates a strange filter implementation
|
|
16eb8b7c
|
2014-02-01T12:02:55
|
|
Tests merging staged files identical to result
|
|
b60149ec
|
2014-01-31T18:43:50
|
|
Tests merge when changes exist in workdir/index
|