| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
- Hide the remaining transports code
- Drop `git_headarray`, switch to using a callback to list refs. Makes
the code cleaner.
|
| |
|
|
|
|
|
| |
There's no difference between `_free` and `_close` semantics: keep
everything with the same name to avoid confusions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The ownership semantics have been changed all over the library to be
consistent. There are no more "borrowed" or duplicated references.
Main changes:
- `git_repository_open2` and `3` have been dropped.
- Added setters and getters to hotswap all the repository owned
objects:
`git_repository_index`
`git_repository_set_index`
`git_repository_odb`
`git_repository_set_odb`
`git_repository_config`
`git_repository_set_config`
`git_repository_workdir`
`git_repository_set_workdir`
Now working directories/index files/ODBs and so on can be
hot-swapped after creating a repository and between operations.
- All these objects now have proper ownership semantics with
refcounting: they all require freeing after they are no longer
needed (the repository always keeps its internal reference).
- Repository open and initialization has been updated to keep in
mind the configuration files. Bare repositories are now always
detected, and a default config file is created on init.
- All the tests affected by these changes have been dropped from the
old test suite and ported to the new one.
|
|\
| |
| | |
reference_rename() cleanup
|
| |
| |
| |
| |
| |
| |
| |
| | |
reference_rename used to delete an old reflog file when renaming a
reference to not confuse git.git. Don't do this anymore but let the user
take care of writing a reflog entry.
Signed-off-by: schu <schu-github@schulog.org>
|
| |
| |
| |
| | |
Signed-off-by: schu <schu-github@schulog.org>
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Networking improvements
|
| | |
| | |
| | |
| | | |
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It can be useful to separate disconnecting from actually destroying
the object.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Make it a bit more resilient.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
| |/
| |
| |
| |
| |
| |
| | |
There is no good reason to expose the negotiation as a different step
to downloading the packfile.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
| | |
|
|/ |
|
|
|
|
|
| |
Do not add the `git2` path to internal includes, or that will cause
an extra path dependency.
|
| |
|
|
|
|
| |
That makes more sense to me.
|
|
|
|
|
|
|
| |
See `global.c` for a description of what we're doing.
When libgit2 is built with GIT_THREADS support, the threading system
must be explicitly initialized with `git_threads_init()`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This new version of the references code is significantly faster and
hopefully easier to read.
External API stays the same. A new method `git_reference_reload()` has
been added to force updating a memory reference from disk. In-memory
references are no longer updated automagically -- this was killing us.
If a reference is deleted externally and the user doesn't reload the
memory object, nothing critical happens: any functions using that
reference should fail gracefully (e.g. deletion, renaming, and so on).
All generated references from the API are read only and must be free'd
by the user. There is no reference counting and no traces of generated
references are kept in the library.
There is no longer an internal representation for references. There is
only one reference struct `git_reference`, and symbolic/oid targets are
stored inside an union.
Packfile references are stored using an optimized struct with flex array
for reference names. This should significantly reduce the memory cost of
loading the packfile from disk.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently libgit2 shares pointers to its internal reference cache with
the user. This leads to several problems like invalidation of reference
pointers when reordering the cache or manipulation of the cache from
user side.
Give each user its own git_reference instead of leaking the internal
representation (struct reference).
Add the following new API functions:
* git_reference_free
* git_reference_is_packed
Signed-off-by: schu <schu-github@schulog.org>
|
|
|
|
|
| |
Ensure that all memory related functions (malloc, calloc, strdup, free,
etc) are using their respective `git__` wrappers.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Our previous assumption that all paths in Windows are encoded in UTF-8
is rather weak, specially when considering that Git is
encoding-agnostic.
These set of functions allow the user to change the library's active
codepage globally, so it is possible to access paths and files on all
international versions of Windows.
Note that the default encoding here is UTF-8 because we assume that 99%
of all Git repositories will be in UTF-8.
Also, if you use non-ascii characters in paths, anywhere, please burn on
a fire.
|
|
|
|
| |
Double-pass binary search. Jeez.
|
| |
|
|
|
|
| |
retrieves the tree object containing this tree entry
|
|
|
|
| |
are equal
|
|\
| |
| | |
Include windows version information in git2.dll
|
| |
| |
| |
| | |
Signed-off-by: Sven Strickroth <email@cs-ware.de>
|
|/
|
|
| |
Signed-off-by: Sven Strickroth <email@cs-ware.de>
|
| |
|
| |
|
|
|
|
|
|
|
| |
Otherwise MSVC doesn't know what we're talking about when we say
int32_t or int64_t.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
| |
|
|
|
|
|
|
| |
Take the opportunity to finish the comment about this function.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
git_repository_config wants to take the global and system paths again
so that one can be explicit if needed.
The git_repository_config_autoload function is provided for the cases
when it's good enough for the library to guess where those files are
located.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
|
|
|
|
|
| |
This allows the library to guess where the system configuration file
should be located.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
|
|
|
|
|
|
| |
wide values
Should fix issue #419.
Signed-off-by: nulltoken <emeric.fermas@gmail.com>
|
|\
| |
| | |
git_repository_config: open global config file automatically
|
| |
| |
| |
| |
| |
| | |
If the global configuration file is missing, it is ignored.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|\ \
| | |
| | | |
Don't use '__attribute__ visibility' with gcc unless it's at version 4 or better
|
| |/
| |
| |
| | |
version 4 or better.
|
| |
| |
| |
| |
| |
| | |
There were quite a few places were spaces were being used instead of
tabs. Try to catch them all. This should hopefully not break anything.
Except for `git blame`. Oh well.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
1. The license header is technically not valid if it doesn't have a
copyright signature.
2. The COPYING file has been updated with the different licenses used in
the project.
3. The full GPLv2 header in each file annoys me.
|
| |
| |
| |
| |
| |
| | |
- fix retrieval of a file status when working against a newly initialized repository
- reduce memory pressure
- prevents a directory from being tested
|
| | |
|
|/
|
|
| |
an error code".
|