summaryrefslogtreecommitdiff
path: root/include/git2/repository.h
Commit message (Collapse)AuthorAgeFilesLines
* repository: Add `git_repository_open_bare`vmg/bare-openVicent Marti2013-04-171-0/+15
|
* immutable references and a pluggable ref databaseEdward Thomson2013-03-071-0/+33
|
* update copyrightsEdward Thomson2013-01-081-1/+1
|
* Correct typos in documentationKevin Sawicki2013-01-061-1/+1
|
* MERGE_HEAD contents iteratorEdward Thomson2013-01-031-0/+16
|
* expose merge metadata cleanupEdward Thomson2013-01-031-0/+9
|
* fetchhead reading/iteratingEdward Thomson2012-12-191-0/+18
|
* Allow compilation as C++Ben Straub2012-12-061-1/+1
|
* Add version fields and init macros for public input structs.Ben Straub2012-11-301-0/+4
|
* Various minor commenting fixesRussell Belfer2012-11-271-1/+5
|
* Typedef enums.Ben Straub2012-11-271-5/+5
|
* API updates for repository.hBen Straub2012-11-271-24/+24
|
* repo: ensure is_empty() checks there are no refsnulltoken2012-11-171-1/+1
|
* repository: Refine repository_head() error reportnulltoken2012-11-121-1/+1
|
* repo: enhance git_repository_state() detectionnulltoken2012-10-271-0/+6
|
* reset changes for mergeEdward Thomson2012-10-241-0/+16
|
* repository: TypoVicent Marti2012-10-191-1/+1
|
* errors: deploy GIT_EORPHANEDHEAD usagenulltoken2012-10-191-2/+4
|
* repository: introduce git_repository_set_head()nulltoken2012-09-171-0/+22
|
* repository: introduce git_repository_set_head_detached()nulltoken2012-09-171-0/+20
|
* repository: introduce git_repository_detach_head()nulltoken2012-09-171-0/+19
|
* repository: fix documentation typonulltoken2012-09-171-1/+1
|
* Add tests and improve param checksRussell Belfer2012-09-111-2/+1
| | | | | | | | Fixed some minor `git_repository_hashfile` issues: - Fixed incorrect doc (saying that repo could be NULL) - Added checking of object type value to acceptable ones - Added more tests for various parameter permutations
* Add git_repository_hashfile to hash with filtersRussell Belfer2012-09-111-0/+25
| | | | | | | | The existing `git_odb_hashfile` does not apply text filtering rules because it doesn't have a repository context to evaluate the correct rules to apply. This adds a new hashfile function that will apply repository-specific filters (based on config, attributes, and filename) before calculating the hash.
* Fix warnings and merge issues on Win64Russell Belfer2012-08-231-0/+5
|
* Add template dir and set gid to repo initRussell Belfer2012-08-221-17/+30
| | | | | | | | | | | | | | | | | This extends git_repository_init_ext further with support for initializing the repository from an external template directory and with support for the "create shared" type flags that make a set GID repository directory. This also adds tests for much of the new functionality to the existing `repo/init.c` test suite. Also, this adds a bunch of new utility functions including a very general purpose `git_futils_mkdir` (with the ability to make paths and to chmod the paths post-creation) and a file tree copying function `git_futils_cp_r`. Also, this includes some new path functions that were useful to keep the code simple.
* Add git_repository_init_ext for power inittersRussell Belfer2012-08-221-4/+131
| | | | | | | The extended version of repository init adds support for many of the things that you can do with `git init` and sets up structures that will make it easier to extend further in the future.
* repository: add a getter and remove function for git's prepared messageCarlos Martín Nieto2012-08-011-0/+22
| | | | | | | | | | The 'git revert/cherry-pick/merge -n' commands leave .git/MERGE_MSG behind so that git-commit can find it. As we don't yet support these operations, users who are shelling out to let git perform these operations haven't had a convenient way to get this message. These functions allow the user to retrieve the message and remove it when she's created the commit.
* repo: add git_repository_wrap_odb() to wrap an ODBCarlos Martín Nieto2012-07-211-0/+13
| | | | Primarily useful when used together with git_odb_backend_one_pack().
* Add flag to write gitlink on setting repo workdirRussell Belfer2012-07-101-1/+4
| | | | | | | | | | | | | | | | | | | | This added a flag to the `git_repository_set_workdir()` function that enables generation of a `.git` gitlink file that links the new workdir to the parent repository. Essentially, the flag tells the function to write out the changes to disk to permanently set the workdir of the repository to the new path. If you pass this flag as true, then setting the workdir to something other than the default workdir (i.e. the parent of the .git repo directory), will create a plain file named ".git" with the standard gitlink contents "gitdir: <repo-path>", and also update the "core.worktree" and "core.bare" config values. Setting the workdir to the default repo workdir will clear the core.worktree flag (but still permanently set core.bare to false). BTW, the libgit2 API does not currently provide a function for clearing the workdir and converting a non-bare repo into a bare one.
* Fix spelling errors.Bruce Mitchener2012-05-191-2/+2
|
* errors: Rename the generic return codesVicent Martí2012-05-181-7/+7
|
* Refactor git_repository_open with new optionsRussell Belfer2012-04-111-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Update Copyright headerschu2012-02-131-1/+1
| | | | Signed-off-by: schu <schu-github@schulog.org>
* Document all of the thingsVicent Marti2011-11-261-1/+119
|
* Rename all `_close` methodsVicent Marti2011-11-261-1/+1
| | | | | There's no difference between `_free` and `_close` semantics: keep everything with the same name to avoid confusions.
* repository: Change ownership semanticsVicent Marti2011-11-261-197/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Fix typo in repository documentationHaitao Li2011-11-181-1/+1
|
* 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>
* 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>
* 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>
* | Cleanup legal dataVicent Marti2011-09-191-22/+4
| | | | | | | | | | | | | | | | | | | | 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.
* | 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-131-6/+6
|/ | | | an error code".
* cleanup: remove trailing spacesKirill A. Shutemov2011-07-011-4/+4
| | | | Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
* repository: Make head_detached() and head_orphan() convenience methods ↵nulltoken2011-06-301-2/+2
| | | | accessible to bindings
* repo: Rename HEAD-related methodsVicent Marti2011-06-281-2/+2
|
* Add git_repository_is_detached, git_repository_is_orphanCarlos Martín Nieto2011-06-281-0/+24
| | | | Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
* config: Cleanup external APIVicent Marti2011-06-181-2/+30
| | | | | Do not mess with environment variables anymore. The new external API has more helper methods, and everything is explicit.