summaryrefslogtreecommitdiff
path: root/include/git2
Commit message (Collapse)AuthorAgeFilesLines
* remote: Cleanup the remotes coderepo-ownershipVicent Marti2011-11-284-52/+14
| | | | | | - Hide the remaining transports code - Drop `git_headarray`, switch to using a callback to list refs. Makes the code cleaner.
* Document all of the thingsVicent Marti2011-11-261-1/+119
|
* Rename all `_close` methodsVicent Marti2011-11-267-18/+18
| | | | | There's no difference between `_free` and `_close` semantics: keep everything with the same name to avoid confusions.
* repository: Change ownership semanticsVicent Marti2011-11-263-207/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Merge pull request #491 from schu/refs-cleanupVicent Martí2011-11-252-0/+22
|\ | | | | reference_rename() cleanup
| * reference_rename: don't delete the reflogschu2011-11-211-0/+5
| | | | | | | | | | | | | | | | 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>
| * Add git_reflog_rename() and git_reflog_delete()schu2011-11-211-0/+17
| | | | | | | | Signed-off-by: schu <schu-github@schulog.org>
* | transport: Add `git_transport_valid_url`Vicent Marti2011-11-221-0/+8
| |
* | Add a note not to free the result from git_remote_lsCarlos Martín Nieto2011-11-221-1/+2
| |
* | Merge pull request #492 from carlosmn/networkingVicent Martí2011-11-211-15/+30
|\ \ | | | | | | Networking improvements
| * | Add git_remote_connectedCarlos Martín Nieto2011-11-211-0/+10
| | | | | | | | | | | | Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
| * | Add git_remote_disconnectCarlos Martín Nieto2011-11-211-0/+10
| | | | | | | | | | | | | | | | | | | | | It can be useful to separate disconnecting from actually destroying the object. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
| * | Add a name to a remote created from the APICarlos Martín Nieto2011-11-181-3/+5
| | | | | | | | | | | | | | | | | | Make it a bit more resilient. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
| * | remote: get rid of git_remote_negotiateCarlos Martín Nieto2011-11-181-12/+5
| |/ | | | | | | | | | | | | 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>
* | tree: Fix documentationVicent Marti2011-11-221-1/+2
| |
* | Fix typo in repository documentationHaitao Li2011-11-181-1/+1
|/
* include: Unify internal include strategiesVicent Marti2011-11-183-6/+6
| | | | | Do not add the `git2` path to internal includes, or that will cause an extra path dependency.
* tree: Add payload to `git_tree_walk`Vicent Marti2011-11-181-2/+2
|
* Rename `git_tree_frompath` to `git_tree_get_subtree`Vicent Marti2011-11-181-7/+7
| | | | That makes more sense to me.
* threads: Fix the shared global state with TLSVicent Marti2011-11-163-73/+48
| | | | | | | 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()`.
* refs: Partial rewrite for read-only refsVicent Marti2011-11-061-4/+39
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* refs: split internal and external referencesschu2011-11-061-10/+21
| | | | | | | | | | | | | | | | | 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>
* global: Properly use `git__` memory wrappersVicent Marti2011-10-281-1/+1
| | | | | Ensure that all memory related functions (malloc, calloc, strdup, free, etc) are using their respective `git__` wrappers.
* tree: Add traversal in post-orderVicent Marti2011-10-271-0/+30
|
* windows: Add support for non-UTF codepagesVicent Marti2011-10-261-0/+59
| | | | | | | | | | | | | | | | 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.
* tree: Fix name lookups once and for allVicent Marti2011-10-201-6/+0
| | | | Double-pass binary search. Jeez.
* tree: Fix lookups by entry nameVicent Marti2011-10-191-0/+6
|
* tree: Add git_tree_frompath() which, given a relative path to a tree entry, ↵nulltoken2011-10-131-0/+14
| | | | retrieves the tree object containing this tree entry
* oid: Add git_oid_streq() which checks if an oid and an hex formatted string ↵nulltoken2011-10-131-0/+10
| | | | are equal
* Merge pull request #449 from csware/include-win-version-informationVicent Martí2011-10-121-0/+15
|\ | | | | Include windows version information in git2.dll
| * put version information in separate fileSven Strickroth2011-10-091-0/+15
| | | | | | | | Signed-off-by: Sven Strickroth <email@cs-ware.de>
* | fix build for x64Sven Strickroth2011-10-091-1/+1
|/ | | | Signed-off-by: Sven Strickroth <email@cs-ware.de>
* msvc: Remove superfluous includesVicent Marti2011-10-051-1/+0
|
* msvc: Properly handle inttypes.h/stdint.hVicent Marti2011-10-053-0/+558
|
* Include stdint.h in git2/config.hCarlos Martín Nieto2011-10-011-0/+1
| | | | | | | 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>
* config: Proper type declarations for 64 bit intsVicent Marti2011-09-301-4/+4
|
* repository: export git_repository_config_autoloadCarlos Martín Nieto2011-09-301-2/+3
| | | | | | Take the opportunity to finish the comment about this function. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* odb: Let users decide compression level for the loose ODBVicent Marti2011-09-291-1/+1
|
* Make repo config loading automatic or completely explicitCarlos Martín Nieto2011-09-271-10/+24
| | | | | | | | | | | 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>
* Add git_config_find_systemCarlos Martín Nieto2011-09-271-0/+12
| | | | | | | This allows the library to guess where the system configuration file should be located. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* config: make git_config_[get|set]_long() able to properly deal with 8 bytes ↵nulltoken2011-09-221-2/+2
| | | | | | | | wide values Should fix issue #419. Signed-off-by: nulltoken <emeric.fermas@gmail.com>
* Merge pull request #398 from carlosmn/config-autohomeVicent Martí2011-09-181-12/+7
|\ | | | | git_repository_config: open global config file automatically
| * git_repository_config: open global config file automaticallyCarlos Martín Nieto2011-09-121-12/+7
| | | | | | | | | | | | If the global configuration file is missing, it is ignored. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* | Merge pull request #411 from boyski/gcc4Vicent Martí2011-09-181-2/+2
|\ \ | | | | | | Don't use '__attribute__ visibility' with gcc unless it's at version 4 or better
| * | Don't use '__attribute__ visibility' with gcc unless it's atDavid Boyce2011-09-181-2/+2
| |/ | | | | | | version 4 or better.
* | Tabify everythingVicent Marti2011-09-1911-103/+103
| | | | | | | | | | | | 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.
* | Cleanup legal dataVicent Marti2011-09-1927-537/+99
| | | | | | | | | | | | | | | | | | | | 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.
* | status: enhance determination of status for a single filenulltoken2011-09-151-1/+3
| | | | | | | | | | | | - fix retrieval of a file status when working against a newly initialized repository - reduce memory pressure - prevents a directory from being tested
* | repository: Add git_repository_head()nulltoken2011-09-151-0/+10
| |
* | Standardized doxygen @return lines for int functions to say "GIT_SUCCESS or ↵David Boyce2011-09-1317-81/+79
|/ | | | an error code".