summaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* branch: Change `git_branch_delete` to take a refbranch-delete-refVicent Marti2012-08-262-13/+13
|
* indexer: kill git_indexer_stats.data_receivedCarlos Martín Nieto2012-08-261-1/+0
| | | | | | | It's not really needed with the current code as we have EOS and the sideband's flush to tell us we're done. Keep the distinction between processed and received objects.
* Merge pull request #895 from carlosmn/sidebandVicent Martí2012-08-242-1/+3
|\ | | | | Add sideband support
| * network: add sideband supportCarlos Martín Nieto2012-08-241-1/+1
| | | | | | | | | | This lets us notify the user of what the remote end is doing while we wait for it to start sending us the packfile.
| * indexer: recognize and mark when all of the packfile has been downloadedCarlos Martín Nieto2012-08-241-0/+2
| | | | | | | | | | We can't always rely on the network telling us when the download is finished. Recognize it from the indexer itself.
* | Working implementation of git_submodule_statusRussell Belfer2012-08-243-91/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | This is a big redesign of the git_submodule_status API and the implementation of the redesigned API. It also fixes a number of bugs that I found in other parts of the submodule API while writing the tests for the status part. This also fixes a couple of bugs in the iterators that had not been noticed before - one with iterating when there is a gitlink (i.e. separate-work-dir) and one where I was treating anything even vaguely submodule-like as a submodule, more aggressively than core git does.
* | Major submodule rewriteRussell Belfer2012-08-242-45/+421
|/ | | | | This replaces the old submodule API with a new extended API that supports most of the things that can be done with `git submodule`.
* Fix warnings and merge issues on Win64Russell Belfer2012-08-231-0/+5
|
* Some cleanup suggested during reviewRussell Belfer2012-08-221-13/+2
| | | | | | | | | | This cleans up a number of items suggested during code review with @vmg, including: * renaming "outside repo" config API to `git_config_open_default` * killing the `git_config_open_global` API * removing the `git_` prefix from the static functions in fileops * removing some unnecessary functionality from the "cp" command
* Add template dir and set gid to repo initRussell Belfer2012-08-222-17/+42
| | | | | | | | | | | | | | | | | 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.
* Merge pull request #891 from arrbee/internal-ignore-apiVicent Martí2012-08-222-0/+75
|\ | | | | API for managing in-memory ignore rules
| * Wrap up ignore API and add testsRussell Belfer2012-08-221-0/+74
| | | | | | | | This fills out the ignore API and adds tests.
| * Add public API for internal ignoresRussell Belfer2012-08-211-0/+1
| | | | | | | | | | | | | | This creates a public API for adding to the internal ignores list, which already existing but was not accessible. This adds the new default value for core.excludesfile also.
* | tree entry: rename git_tree_entry_attributes() into git_tree_entry_filemode()nulltoken2012-08-211-2/+2
| |
* | filemode: deploy enum usagenulltoken2012-08-211-2/+2
| |
* | filemode: introduce enum to ease use of attributesnulltoken2012-08-211-0/+10
|/
* treebuilder: enhance attributes handling on insertionnulltoken2012-08-191-1/+7
|
* Merge pull request #778 from ben/cloneVicent Martí2012-08-194-3/+133
|\ | | | | Clone
| * Add documentation for clone methods.Ben Straub2012-07-311-2/+3
| |
| * Add checkout.h to git2.h.Ben Straub2012-07-313-4/+5
| | | | | | Also correcting some documentation strings.
| * Enable stats on git_index_read_tree.Ben Straub2012-07-301-14/+2
| | | | | | | | | | Replace with the contents of git_index_read_tree_with_stats() and improve documentation comments.
| * Checkout: use git_index_read_tree_with_stats.Ben Straub2012-07-301-0/+15
| | | | | | | | | | New variant of git_index_read_tree that fills in the 'total' field of a git_indexer_stats struct as it's walking the tree.
| * Checkout: add head- and ref-centric checkouts.Ben Straub2012-07-271-9/+14
| | | | | | | | | | | | | | | | | | Renamed git_checkout_index to what it really was, and removed duplicate code from clone.c. Added git_checkout_ref, which updates HEAD and hands off to git_checkout_head. Added tests for the options the caller can pass to git_checkout_*.
| * Merge remote-tracking branch 'upstream/development' into test-mergeBen Straub2012-07-278-37/+174
| |\
| * | Checkout: implementation of most optionsBen Straub2012-07-261-1/+2
| | |
| * | Restructure for better checkout optionsBen Straub2012-07-262-21/+26
| | | | | | | | | | | | | | | | | | * Removed the #define for defaults * Promoted progress structure to top-level API call argument
| * | checkout: introduce git_checkout_optsBen Straub2012-07-261-3/+33
| | | | | | | | | | | | | | | Refactor checkout into several more-sensible entry points, which consolidates common options into a single structure that may be passed around.
| * | Merge branch 'development' into cloneBen Straub2012-07-1718-79/+217
| |\ \
| * | | Fix documentation comment to match actual params.Ben Straub2012-07-131-4/+1
| | | |
| * | | Clone: new home for git_checkout_force.Ben Straub2012-06-211-0/+38
| | | |
| * | | Add progress reporting to clone.Ben Straub2012-06-211-3/+6
| | | |
| * | | Add git_clone and git_clone_bare.Ben Straub2012-06-212-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far they only create a repo, setup the "origin" remote, and fetch. The API probably needs work as well; there's no way to get progress information at this point. Also uncovered a shortcoming; git_remote_download doesn't fetch over local transport.
* | | | refs: fix missing parameter documentationnulltoken2012-08-151-0/+2
| | | |
* | | | notes: slight documentation enhancementsnulltoken2012-08-151-12/+14
| | | |
* | | | Merge pull request #873 from carlosmn/tree-walkCarlos Martín Nieto2012-08-141-2/+3
|\ \ \ \ | | | | | | | | | | git_tree_walk callback return value semantic does not match documentation
| * | | | tree: allow the user to skip an entry or cancel the walkCarlos Martín Nieto2012-08-131-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Returning a negative cancels the walk, and returning a positive one causes us to skip an entry, which was previously done by a negative value. This allows us to stay consistent with the rest of the functions that take a callback and keeps the skipping functionality.
* | | | | Merge pull request #875 from arrbee/fix-message-prettify-length-checkRussell Belfer2012-08-141-3/+5
|\ \ \ \ \ | | | | | | | | | | | | Fix message prettify length check
| * | | | | Make git_message_prettify return bytes writtenRussell Belfer2012-08-141-3/+5
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you want to be absolutely safe with git_message_prettify, you can now pass a NULL pointer for the buffer and get back the number of bytes that would be copied into the buffer. This means that an error is a non-negative return code and a success will be greater than zero from this function.
* | | | | Merge pull request #871 from joshtriplett/fix-note_foreach-docsVicent Martí2012-08-131-1/+1
|\ \ \ \ \ | | | | | | | | | | | | git_note_foreach: Fix documentation for notes_ref parameter
| * | | | | git_note_foreach: Fix documentation for notes_ref parameterJosh Triplett2012-08-121-1/+1
| |/ / / /
* | | | | Merge pull request #870 from joshtriplett/fix-note_create-docsVicent Martí2012-08-131-2/+2
|\ \ \ \ \ | | | | | | | | | | | | git_note_oid: Fix the documentation to reference parameters using the correct names
| * | | | | git_note_oid: Fix the documentation to reference parameters using the ↵Josh Triplett2012-08-121-2/+2
| |/ / / / | | | | | | | | | | | | | | | correct names
* | | | | Merge pull request #872 from joshtriplett/fix-note_remove-docsVicent Martí2012-08-131-1/+1
|\ \ \ \ \ | | | | | | | | | | | | git_note_create: Copyediting on documentation for the oid parameter
| * | | | | git_note_remove: Copyediting on documentation for the oid parameterJosh Triplett2012-08-121-1/+1
| |/ / / /
* | | | | Fix incorrect array size in example for git_config_get_mappedJosh Triplett2012-08-121-1/+1
|/ / / / | | | | | | | | | | | | | | | | | | | | In the documentation for git_config_get_mapped, the sample mapping array uses [3] but has 4 entries. Fix by dropping the size entirely and letting the compiler figure it out.
* | | | Export git_attr_valueJosh Triplett2012-08-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 0c9eacf3d2c83256736a5bb2a240e73afd13d55f introduced the function git_attr_value and switched the GIT_ATTR_* macros to use it, but attempting to use that function leads to a linker error (undefined reference to `git_attr_value'). Export git_attr_value so programs can actually call it.
* | | | Merge remote-tracking branch 'arrbee/tree-walk-fixes' into developmentVicent Marti2012-08-0611-29/+67
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/notes.c src/transports/git.c src/transports/http.c src/transports/local.c tests-clar/odb/foreach.c
| * | | | Update iterators for consistency across libraryRussell Belfer2012-08-0310-29/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This updates all the `foreach()` type functions across the library that take callbacks from the user to have a consistent behavior. The rules are: * A callback terminates the loop by returning any non-zero value * Once the callback returns non-zero, it will not be called again (i.e. the loop stops all iteration regardless of state) * If the callback returns non-zero, the parent fn returns GIT_EUSER * Although the parent returns GIT_EUSER, no error will be set in the library and `giterr_last()` will return NULL if called. This commit makes those changes across the library and adds tests for most of the iteration APIs to make sure that they follow the above rules.
| * | | | Fix git_tree_walk to return user errorRussell Belfer2012-07-261-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes sure that an error code returned by the callback function of `git_tree_walk` will stop the iteration and get propagated back to the caller verbatim. Also, this adds a minor helper function `git_tree_entry_byoid` that searches a `git_tree` for an entry with the given OID. This isn't a fast function, but it's easier than writing the loop yourself as an external user of the library.