|
9c8ed499
|
2014-04-29T15:05:58
|
|
Remove trace / add git_diff_perfdata struct + api
|
|
bc91347b
|
2014-04-30T11:16:31
|
|
Fix remaining init_options inconsistencies
There were a couple of "init_opts()" functions a few more cases
of structure initialization that I somehow missed.
|
|
48e60ae7
|
2014-04-21T11:23:29
|
|
Don't redefine the same callback types, their signatures may change
|
|
27e54bcf
|
2014-02-07T14:17:19
|
|
Add public diff print helpers
The usefulness of these helpers came up for me while debugging
some of the iterator changes that I was making, so since they
have also been requested (albeit indirectly) I thought I'd include
them.
|
|
6105d597
|
2014-03-26T18:17:08
|
|
In-memory packing backend
|
|
b9f81997
|
2014-03-05T21:49:23
|
|
Added function-based initializers for every options struct.
The basic structure of each function is courtesy of arrbee.
|
|
f5753999
|
2014-03-04T15:34:23
|
|
Add exists_prefix to ODB backend and ODB API
|
|
80c29fe9
|
2014-01-17T10:45:11
|
|
Add git_commit_amend API
This adds an API to amend an existing commit, basically a shorthand
for creating a new commit filling in missing parameters from the
values of an existing commit. As part of this, I also added a new
"sys" API to create a commit using a callback to get the parents.
This allowed me to rewrite all the other commit creation APIs so
that temporary allocations are no longer needed.
|
|
7ee8c7e6
|
2014-02-05T11:07:34
|
|
refs: placeholder conditional delete
We don't actually pass the old value yet.
|
|
91123661
|
2014-02-04T22:04:00
|
|
refdb: add conditional symbolic updates
Add a parameter to the backend to allow checking for the old symbolic
target.
|
|
9b148098
|
2013-12-18T19:58:16
|
|
refs: conditional ref updates
Allow updating references if the old value matches the given one.
|
|
47e28349
|
2014-01-24T12:01:34
|
|
commit: remvoe legacy 'oid' naming
|
|
4e1f517c
|
2013-12-18T09:33:45
|
|
Merge pull request #1920 from libgit2/cmn/ref-with-log
Reference operations with log
|
|
9cfce273
|
2013-12-12T12:11:38
|
|
Cleanups, renames, and leak fixes
This renames git_vector_free_all to the better git_vector_free_deep
and also contains a couple of memory leak fixes based on valgrind
checks. The fixes are specifically: failure to free global dir
path variables when not compiled with threading on and failure to
free filters from the filter registry that had not be initialized
fully.
|
|
f2105129
|
2013-11-23T14:39:53
|
|
refs: expose has_log() on the backend
The frontend used to look at the file directly, but that's obviously not
the right thing to do. Expose it on the backend and use that function
instead.
|
|
8d5ec910
|
2013-11-23T14:13:01
|
|
refs: expose a way to ensure a ref has a log
Sometimes (e.g. stash) we want to make sure that a log will be written,
even if it's not in one of the standard locations. Let's make that
easier.
|
|
a57dd3b7
|
2013-11-13T18:15:20
|
|
reflog: integrate into the ref writing
Whenever a reference is created or updated, we need to write to the
reflog regardless of whether the user gave us a message, so we shouldn't
leave that to the ref frontend, but integrate it into the backend.
This also eliminates the race between ref update and writing to the
reflog, as we protect the reflog with the ref lock.
As an additional benefit, this reflog append on the backend happens by
appending to the file instead of parsing and rewriting it.
|
|
110df893
|
2013-11-13T13:36:37
|
|
refdb: add a `message` parameter for appending to the log
This is as yet unused.
|
|
3793fa9b
|
2013-10-31T01:08:50
|
|
Fix saving remotes with several fetch/push ref specs.
At some moment git_config_delete_entry lost the ability to delete one entry of
a multivar configuration. The moment you had more than one fetch or push
ref spec for a remote you will not be able to save that remote anymore. The
changes in network::remote::remotes::save show that problem.
I needed to create a new git_config_delete_multivar because I was not able to
remove one or several entries of a multivar config with the current API.
Several tries modifying how git_config_set_multivar(..., NULL) behaved were
not successful.
git_config_delete_multivar is very similar to git_config_set_multivar, and
delegates into config_delete_multivar of config_file. This function search
for the cvar_t that will be deleted, storing them in a temporal array, and
rebuilding the linked list. After calling config_write to delete the entries,
the cvar_t stored in the temporal array are freed.
There is a little fix in config_write, it avoids an infinite loop when using
a regular expression (case for the multivars). This error was found by the
test network::remote::remotes::tagopt.
|
|
5c50f22a
|
2013-10-28T09:25:44
|
|
Merge pull request #1891 from libgit2/cmn/fix-thin-packs
Add support for thin packs
|
|
8f4a8b09
|
2013-10-28T06:20:28
|
|
Merge pull request #1802 from libgit2/cmn/reflog-backend
Make reflog part of refdb
|
|
867f7c9b
|
2013-10-08T16:59:59
|
|
Rename new fn to git_repository_reinit_filesystem
|
|
92dac975
|
2013-10-08T16:35:57
|
|
Make reference lookups apply precomposeunicode
Before these changes, looking up a reference would return the
same precomposed or decomposed form of the reference name that
was used to look it up, so on MacOS which ignores the difference
between the two, a single reference could be looked up either way
and git_reference_name would return the form of the name that was
used to look it up! This change makes lookup always return the
precomposed name if core.precomposeunicode is set regardless of
which version was used to look it up. The reference iterator was
already returning the precomposed form from earlier work.
This also updates the CMakeLists.txt rules for enabling iconv
usage because the clar tests for this code were actually not being
activated properly with the old version.
Finally, this moves git_repository_reset_filesystem from include/
git2/repository.h to include/git2/sys/repository.h since it is not
really a function that normal library users should have to think
about very often.
|
|
0b33fca0
|
2013-10-02T13:39:35
|
|
indexer: fix thin packs
When given an ODB from which to read objects, the indexer will attempt
to inject the missing bases at the end of the pack and update the
header and trailer to reflect the new contents.
|
|
0174794a
|
2013-08-21T05:12:49
|
|
reflog: bring _append and _drop back to the frontend
These functions act purely on the reflog data structure.
|
|
b976f3c2
|
2013-08-19T13:01:49
|
|
reflog: move the reflog implementation into refdb_fs
References and their logs are logically coupled, let's make it so in
the code by moving the fs-based reflog implementation to live next to
the fs-based refs one.
As part of the change, make the function take names rather than
references, as only the names are relevant when looking up and
handling reflogs.
|
|
e0b267af
|
2013-09-25T10:49:25
|
|
That's the refdb, it's not the odb...
|
|
e3f3868a
|
2013-09-24T11:04:14
|
|
'del' instead of 'delete' for the poor C++ users
|
|
eefc32d5
|
2013-09-16T12:54:40
|
|
Bug fixes and cleanups
This contains a few bug fixes and some header and API cleanups.
The main API change is that filters should now use GIT_PASSTHROUGH
to indicate that they wish to skip processing a file instead of
GIT_ENOTFOUND.
The bug fixes include a possible out-of-range buffer access in
the ident filter, a filter ordering problem I introduced into the
custom filter tests on Windows, and a filter buf NUL termination
issue that was coming up on Linux.
|
|
eab3746b
|
2013-09-15T22:23:39
|
|
More filtering tests including order
This adds more tests of filters, including the ident filter when
mixed with custom filters. I was able to combine with the reverse
filter and demonstrate that the order of filter application with
the default priority constants matches the order of core Git.
Also, this fixes two issues in the ident filter: preventing ident
expansion on binary files and avoiding a NULL dereference when
dollar sign characters are found without Id.
|
|
b47349b8
|
2013-09-12T14:48:24
|
|
Port tests from PR 1683
This ports over some of the tests from
https://github.com/libgit2/libgit2/pull/1683
by @yorah and @ethomson
|
|
a9f51e43
|
2013-09-11T22:00:36
|
|
Merge git_buf and git_buffer
This makes the git_buf struct that was used internally into an
externally available structure and eliminates the git_buffer.
As part of that, some of the special cases that arose with the
externally used git_buffer were blended into the git_buf, such as
being careful about git_buf objects that may have a NULL ptr and
allowing for bufs with a valid ptr and size but zero asize as a
way of referring to externally owned data.
|
|
4b11f25a
|
2013-09-11T16:38:33
|
|
Add ident filter
This adds the ident filter (that knows how to replace $Id$) and
tweaks the filter APIs and code so that git_filter_source objects
actually have the updated OID of the object being filtered when
it is a known value.
|
|
40cb40fa
|
2013-09-11T14:23:39
|
|
Add functions to manipulate filter lists
Extend the git2/sys/filter API with functions to look up a filter
and add it manually to a filter list. This requires some trickery
because the regular attribute lookups and checks are bypassed when
this happens, but in the right hands, it will allow a user to have
granular control over applying filters.
|
|
29e92d38
|
2013-09-10T16:53:09
|
|
Hook up filter initialize callback
I knew I forgot something
|
|
2a7d224f
|
2013-09-10T16:33:32
|
|
Extend public filter api with filter lists
This moves the git_filter_list into the public API so that users
can create, apply, and dispose of filter lists. This allows more
granular application of filters to user data outside of libgit2
internals.
This also converts all the internal usage of filters to the public
APIs along with a few small tweaks to make it easier to use the
public git_buffer stuff alongside the internal git_buf.
|
|
974774c7
|
2013-09-09T16:57:34
|
|
Add attributes to filters and fix registry
The filter registry as implemented was too primitive to actually
work once multiple filters were coming into play. This expands
the implementation of the registry to handle multiple prioritized
filters correctly.
Additionally, this adds an "attributes" field to a filter that
makes it really really easy to implement filters that are based
on one or more attribute values. The lookup and even simple value
checking can all happen automatically without custom filter code.
Lastly, with the registry improvements, this fills out the filter
lifecycle callbacks, with initialize and shutdown callbacks that
will be called before the filter is first used and after it is
last invoked. This allows for system-wide initialization and
cleanup by the filter.
|
|
570ba25c
|
2013-08-30T16:02:07
|
|
Make git_filter_source opaque
|
|
85d54812
|
2013-08-28T16:44:04
|
|
Create public filter object and use it
This creates include/sys/filter.h with a basic definition of a
git_filter and then converts the internal code to use it. There
are related internal objects (git_filter_list) that we will want
to publish at some point, but this is a first step.
|
|
b1a6c316
|
2013-08-30T17:36:00
|
|
odb: Move the auto refresh logic to the pack backend
Previously, `git_object_read()`, `git_object_read_prefix()` and
`git_object_exists()` were implementing an auto refresh logic. When the
expected object couldn't be found in any backend, a call to
`git_odb_refresh()` was triggered and the lookup was once again performed
against all backends.
This commit removes this auto-refresh logic from the odb layer and pushes
it down into the pack-backend (as it's the only one currently exposing
a `refresh()` endpoint).
|
|
b8b22d77
|
2013-08-28T06:04:51
|
|
Merge pull request #1772 from libgit2/config-iter
Configuration iterators redux
|
|
7a3764be
|
2013-08-17T01:55:52
|
|
odb: document git_odb_stream
Clarify the role of each function and in particular mention that there
is no need for the backend or stream to worry about the object's id,
as it will be given when `finalize_write` is called.
|
|
fe0c6d4e
|
2013-08-17T01:41:08
|
|
odb: make it clearer that the id is calculated in the frontend
The frontend is in charge of calculating the id of the objects. Thus
the backends should treat it as a read-only value. The positioning in
the function signature made it seem as though it was an output
parameter.
Make the id const and move it from the front to behind the subject
(backend or stream).
|
|
f4be8209
|
2013-08-14T00:45:05
|
|
config: don't special-case the multivar iterator
Build it on top of the normal iterator instead, which lets use re-use
a lot of code.
|
|
99dfb538
|
2013-08-08T17:57:59
|
|
config: working multivar iterator
Implement the foreach version as a wrapper around the iterator.
|
|
cca5df63
|
2013-08-08T16:59:39
|
|
config: hopefully get the iterator to work on multivars
|
|
3a7ffc29
|
2013-08-08T16:18:07
|
|
config: initial multivar iterator
|
|
eba73992
|
2013-08-08T14:39:32
|
|
config: move next() and free() into the iterator
Like we have in the references iterator, next and free belong in the
iterator itself.
|
|
4efa3290
|
2013-08-08T13:41:18
|
|
config: get_multivar -> get_multivar_foreach
The plain function will return an iterator, so move this one out of
the way.
|
|
4d588d97
|
2013-08-08T11:24:47
|
|
Don't typedef a pointer
Make the iterator structure opaque and make sure it compiles.
|
|
a603c191
|
2013-03-18T21:02:36
|
|
replaced foreach() with non callback based iterations in git_config_backend
new functions in struct git_config_backend:
* iterator_new(...)
* iterator_free(...)
* next(...)
The old callback based foreach style can still be used with `git_config_backend_foreach_match`
|
|
c05a55b0
|
2013-07-23T09:40:19
|
|
Clean up some documentation
clang's docparser highlighted these.
|
|
4e6e2ff2
|
2013-05-30T03:47:10
|
|
...Aaaand this works
|
|
ec24e542
|
2013-05-29T22:47:37
|
|
What are the chances, really
|
|
56960b83
|
2013-05-28T20:47:55
|
|
Liike this
|
|
16adc9fa
|
2013-05-24T10:35:58
|
|
Typedef git_config_level_t and use it everywhere
The GIT_CONFIG_LEVEL constants actually work well as an enum
because they are mutually exclusive, so this adds a typedef to
the enum and uses that everywhere that one of these constants are
expected, instead of the old code that typically used an unsigned
int.
|
|
1fed6b07
|
2013-05-13T21:57:37
|
|
Fix trailing whitespaces
|
|
0cb16fe9
|
2013-05-15T20:26:55
|
|
Unify whitespaces to tabs
|
|
b6cc559a
|
2013-05-11T02:42:49
|
|
Merge pull request #1385 from carlosmn/refs-iter
Introduce a refs iterator
|
|
c58cac12
|
2013-05-04T18:06:14
|
|
Introduce a glob-filtering iterator
If the backend doesn't provide support for it, the matching is done in
refdb on top of a normal iterator.
|
|
2b562c3a
|
2013-05-04T16:32:58
|
|
refs: remove the OID/SYMBOLIC filtering
Nobody should ever be using anything other than ALL at this level, so
remove the option altogether.
As part of this, git_reference_foreach_glob is now implemented in the
frontend using an iterator. Backends will later regain the ability of
doing the glob filtering in the backend.
|
|
4def7035
|
2013-03-02T19:31:03
|
|
refs: introduce an iterator
This allows us to get a list of reference names in a loop instead of callbacks.
|
|
467cbec7
|
2013-05-05T16:48:34
|
|
commit: make create_from_oids() accept plain oid
|
|
75d1c8c6
|
2013-04-30T17:33:11
|
|
move NAME and REUC extensions to sys/
|
|
879458e7
|
2013-04-24T15:52:33
|
|
repo: Add `git_repository__cleanup`
|
|
21ca0451
|
2013-04-21T12:52:17
|
|
Move git_reference__alloc to include/git2/sys
Create a new include/git2/sys/refs.h and move the reference alloc
functions there. Also fix some documentation issues and some
minor code cleanups.
|
|
4dcd8780
|
2013-04-19T17:17:44
|
|
Move refdb_backend to include/git2/sys
This moves most of the refdb stuff over to the include/git2/sys
directory, with some minor shifts in function organization.
While I was making the necessary updates, I also removed the
trailing whitespace in a few files that I modified just because I
was there and it was bugging me.
|
|
9233b3de
|
2013-04-19T13:17:29
|
|
Move git_commit_create_from_oids into sys/commit.h
Actually this renames git_commit_create_oid to
git_commit_create_from_oids and moves the API declaration to
include/git2/sys/commit.h since it is a dangerous API for general
use (because it doesn't check that the OID list items actually
refer to real objects).
|
|
1384b688
|
2013-04-19T13:00:12
|
|
Move some low-level repo fns to include/git2/sys
|
|
83cc70d9
|
2013-04-19T12:48:33
|
|
Move odb_backend implementors stuff into git2/sys
This moves some of the odb_backend stuff that is related to the
internals of an odb_backend implementation into include/git2/sys.
Some of the stuff related to streaming I left in include/git2
because it seemed like it would be reasonably needed by a normal
user who wanted to stream objects into and out of the ODB.
Also, I added APIs for traversing the list of backends so that
some of the tests would not need to access ODB internals.
|
|
83041c71
|
2013-04-19T11:52:04
|
|
Move git_config_backend to include/git2/sys
Moving backend implementor objects into include/git2/sys so the
APIs can be isolated from the ones that normal libgit2 users
would be likely to use.
|