|
7784bcbb
|
2012-04-11T11:52:59
|
|
Refactor git_repository_open with new options
Add a new command `git_repository_open_ext` with extended options
that control how searching for a repository will be done. The
existing `git_repository_open` and `git_repository_discover` are
reimplemented on top of it. We may want to change the default
behavior of `git_repository_open` but this commit does not do that.
Improve support for "gitdir" files where the work dir is separate
from the repo and support for the "separate-git-dir" config. Also,
add support for opening repos created with `git-new-workdir` script
(although I have only confirmed that they can be opened, not that
all functions work correctly).
There are also a few minor changes that came up:
- Fix `git_path_prettify` to allow in-place prettifying.
- Fix `git_path_root` to support backslashes on Win32. This fix
should help many repo open/discover scenarios - it is the one
function called when opening before prettifying the path.
- Tweak `git_config_get_string` to set the "out" pointer to NULL
if the config value is not found. Allows some other cleanup.
- Fix a couple places that should have been calling
`git_repository_config__weakptr` and were not.
- Fix `cl_git_sandbox_init` clar helper to support bare repos.
|
|
5e0de328
|
2012-02-13T17:10:24
|
|
Update Copyright header
Signed-off-by: schu <schu-github@schulog.org>
|
|
6632c155
|
2011-11-26T08:30:14
|
|
Document all of the things
|
|
45e79e37
|
2011-11-26T04:59:21
|
|
Rename all `_close` methods
There's no difference between `_free` and `_close` semantics: keep
everything with the same name to avoid confusions.
|
|
9462c471
|
2011-11-25T08:16:26
|
|
repository: Change ownership semantics
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.
|
|
28ba94ce
|
2011-11-18T17:43:43
|
|
Fix typo in repository documentation
|
|
c36280a0
|
2011-09-30T06:26:29
|
|
repository: export git_repository_config_autoload
Take the opportunity to finish the comment about this function.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
40fe5fbe
|
2011-09-22T22:50:36
|
|
Make repo config loading automatic or completely explicit
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>
|
|
6640266e
|
2011-09-18T19:58:22
|
|
Merge pull request #398 from carlosmn/config-autohome
git_repository_config: open global config file automatically
|
|
bb742ede
|
2011-09-19T01:54:32
|
|
Cleanup legal data
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.
|
|
3601c4bf
|
2011-08-08T13:40:17
|
|
repository: Add git_repository_head()
|
|
d9111722
|
2011-09-13T12:30:25
|
|
Standardized doxygen @return lines for int functions to say "GIT_SUCCESS or an error code".
|
|
f9d4b0c3
|
2011-09-12T17:25:46
|
|
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>
|
|
932d1baf
|
2011-06-30T19:52:34
|
|
cleanup: remove trailing spaces
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
|
|
408d733b
|
2011-06-30T06:56:58
|
|
repository: Make head_detached() and head_orphan() convenience methods accessible to bindings
|
|
c682886e
|
2011-06-28T21:09:22
|
|
repo: Rename HEAD-related methods
|
|
35502d2e
|
2011-06-28T13:55:00
|
|
Add git_repository_is_detached, git_repository_is_orphan
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
07ff8817
|
2011-06-18T00:39:39
|
|
config: Cleanup external API
Do not mess with environment variables anymore. The new external API has
more helper methods, and everything is explicit.
|
|
b22d1479
|
2011-06-16T17:46:06
|
|
Add git_repository_config API
This function puts the global and repository configurations in one
git_config object and gives it to the user.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
ef9a6f4c
|
2011-06-15T13:47:41
|
|
Merge pull request #261 from Romain-Geissler/discovery-path-v2
Fix: GIT_PATH_PATH_SEPARATOR is now a semi-colon under Windows.
|
|
0657e46d
|
2011-06-15T12:36:08
|
|
Fix: GIT_PATH_PATH_SEPARATOR is now a semi-colon under Windows.
GIT_PATH_LIST_SEPARATOR and GIT_PATH_MAX are made public so
that it's can be used by a client.
|
|
602ee38b
|
2011-06-04T20:44:14
|
|
repository: Export all internal paths
|
|
fd0574e5
|
2011-06-04T01:01:20
|
|
Repository: Added the git_repository_discover function that finds by itself the git directory that manage a given directory path.
|
|
50b7334e
|
2011-06-01T09:58:21
|
|
Merge pull request #206 from nulltoken/topic/is-bare
Add git_repository_is_bare() accessor
|
|
f7e59c4d
|
2011-06-01T18:34:21
|
|
index: Change the memory management for repo indexes
The `git_repository_index` call now returns a brand new index that must
be manually free'd.
|
|
fa9bcd81
|
2011-05-24T21:48:07
|
|
Add git_repository_is_bare() accessor
|
|
4a34b3a9
|
2011-04-09T15:49:44
|
|
Add two new accessors to the repository
git_repository_path() and git_repository_workdir() respectively return the path to the git repository and the working directory. Those paths are absolute and normalized.
|
|
41233c40
|
2011-04-08T12:42:18
|
|
Add new method `git_repository_is_empty`
|
|
f0d08b7c
|
2011-03-23T15:40:47
|
|
Remove `git_repository_gc` from the headers
|
|
8613d4a9
|
2011-03-16T01:10:40
|
|
Fix signature in `git_repository_gc`
The method returns an int with the amount of objects free'd
|
|
54a1b36c
|
2011-03-16T01:07:06
|
|
Export `git_repository_gc` properly
One of my brainfarts made me export it as `git_repository_close` instead
of GC. Duh.
|
|
6b2a1941
|
2011-03-12T23:09:16
|
|
Fix the retarded object interdependency system
It's no longer retarded. All object interdependencies are stored as OIDs
instead of actual objects. This should be hundreds of times faster,
specially on big repositories. Heck, who knows, maye it doesn't even
segfault -- wouldn't that be awesome?
What has changed on the API?
`git_commit_parent`, `git_commit_tree`, `git_tag_target` now return
their values through a pointer-to-pointer, and have an error code.
`git_commit_set_tree` and `git_tag_set_target` now return an error
code and may fail.
`git_repository_free__no_gc` has been deprecated because it's
stupid. Since there are no longer any interdependencies between
objects, we don't need internal reference counting, and GC
never fails or double-free's pointers.
`git_object_close` now does a very sane thing: marks an object
as unused. Closed objects will be eventually free'd from the
object cache based on LRU. Please use `git_object_close` from
the garbage collector `destroy` method on your bindings. It's
100% safe.
`git_repository_gc` is a new method that forces a garbage collector
pass through the repo, to free as many LRU objects as possible.
This is useful if we are running out of memory.
|
|
71d33382
|
2011-03-03T20:20:45
|
|
Move the external includes folder from `src` to `include`
Signed-off-by: Vicent Marti <tanoku@gmail.com>
|