summaryrefslogtreecommitdiff
path: root/include/git2/index.h
Commit message (Collapse)AuthorAgeFilesLines
* doc: add documentation to all the public structs and enumscmn/doc-allCarlos Martín Nieto2014-12-061-0/+3
| | | | | | | | | | This makes them show up in the reference, even if the text itself isn't the most descriptive. These have been found with grep -Przon '\n\ntypedef struct.*?\{' -- include grep -Przon '\n\ntypedef enum.*?\{' -- include
* index: split GIT_IDXENTRY into two flag enumscmn/docstuffCarlos Martín Nieto2014-06-031-28/+31
| | | | | | The documentation has shown this as a single enum for a long time. These should in fact be two enums. One with the bits for the flags and another with the bits for the extended flags.
* Formatting fixes for the docsCarlos Martín Nieto2014-06-031-1/+1
| | | | | These are some issues I found while playing around with the new parser for docurium.
* Lay groundwork for updating stat cache in diffRussell Belfer2014-05-021-1/+1
| | | | | | | | | | | This reorganized the diff OID calculation to make it easier to correctly update the stat cache during a diff once the flags to do so are enabled. This includes marking the path of a git_index_entry as const so we can make a "fake" git_index_entry with a "const char *" path and not get warnings. I was a little surprised at how unobtrusive this change was, but I think it's probably a good thing.
* Fix leak in git_index_conflict_cleanupRussell Belfer2014-04-171-7/+12
| | | | | | | | | | | | | I introduced a leak into conflict cleanup by removing items from inside the git_vector_remove_matching call. This simplifies the code to just use one common way for the two conflict cleanup APIs. When an index has an active snapshot, removing an item can cause an error (inserting into the deferred deletion vector), so I made the git_index_conflict_cleanup API return an error code. I felt like this wasn't so bad since it is just like the other APIs. I fixed up a couple of comments while I was changing the header.
* Some index internals refactoringRussell Belfer2014-04-171-4/+11
| | | | | | | | Again, laying groundwork for some index iterator changes, this contains a bunch of code refactorings for index internals that should make it easier down the line to add locking around index modifications. Also this removes the redundant prefix_position function and fixes some potential memory leaks.
* Const correctness!Jacques Germishuys2014-04-031-1/+1
|
* Give the correct name for the function in the doc.fix-memory-index-doc-commentRob Rix2014-04-021-2/+2
| | | Per @carlosmn, git_index_add is now named git_index_add_bypath.
* Correct a stale reference to GIT_EBAREINDEXRob Rix2014-04-011-1/+1
|
* Address PR commentsRussell Belfer2014-02-201-6/+6
| | | | | | | * Make GIT_INLINE an internal definition so it cannot be used in public headers * Fix language in CONTRIBUTING * Make index caps API use signed instead of unsigned values
* index: rename an entry's id to 'id'Carlos Martín Nieto2014-01-251-1/+1
| | | | This was not converted when we converted the rest, so do it now.
* Update docs for new callback return value behaviorRussell Belfer2013-12-111-4/+4
|
* Convert git_index_read to have a "force" flagRussell Belfer2013-11-011-9/+9
| | | | | This is a little more intuitive than the turned-around option that I originally wrote.
* Make diff and status perform soft index reloadRussell Belfer2013-11-011-5/+12
| | | | | | | | | | | | | | | | | | | | | This changes `git_index_read` to have two modes - a hard index reload that always resets the index to match the on-disk data (which was the old behavior) and a soft index reload that uses the timestamp / file size information and only replaces the index data if the file on disk has been modified. This then updates the git_status code to do a soft reload unless the new GIT_STATUS_OPT_NO_REFRESH flag is passed in. This also changes the behavior of the git_diff functions that use the index so that when an index is not explicitly passed in (i.e. when the functions call git_repository_index for you), they will also do a soft reload for you. This intentionally breaks the file signature of git_index_read because there has been some confusion about the behavior previously and it seems like all existing uses of the API should probably be examined to select the desired behavior.
* index: Enhance documentationnulltoken2013-10-041-0/+3
|
* Clean up newly introduced warningsRussell Belfer2013-09-231-4/+4
| | | | | | | | | | The attempt to "clean up warnings" seems to have introduced some new warnings on compliant compilers. This fixes those in a way that I suspect will also be okay for the non-compliant compilers. Also this fixes what appears to be an extra semicolon in the repo initialization template dir handling (and as part of that fix, handles the case where an error occurs correctly).
* Fix warningLinquize2013-09-191-1/+1
|
* Add API to get path to index fileRussell Belfer2013-07-101-0/+8
|
* Add public API for pathspec matchingRussell Belfer2013-07-101-0/+8
| | | | | | | | | | | | | | | This adds a new public API for compiling pathspecs and matching them against the working directory, the index, or a tree from the repository. This also reworks the pathspec internals to allow the sharing of code between the existing internal usage of pathspec matching and the new external API. While this is working and the new API is ready for discussion, I think there is still an incorrect behavior in which patterns are always matched against the full path of an entry without taking the subdirectories into account (so "s*" will match "subdir/file" even though it wouldn't with core Git). Further enhancements are coming, but this was a good place to take a functional snapshot.
* Fixed most documentation header bugsAndreas Linde2013-06-241-1/+1
| | | | | | | | | | | Fixed a few header @param and @return typos with the help of -Wdocumentation in Xcode. The following warnings have not been fixed: common.h:213 - Not sure how the documentation format is for '...' notes.h:102 - Correct @param name but empty text notes.h:111 - Correct @param name but empty text pack.h:140 - @return missing text pack.h:148 - @return missing text
* Add index pathspec-based operationsRussell Belfer2013-06-191-0/+115
| | | | | | | | | | | | | This adds three new public APIs for manipulating the index: 1. `git_index_add_all` is similar to `git add -A` and will add files in the working directory that match a pathspec to the index while honoring ignores, etc. 2. `git_index_remove_all` removes files from the index that match a pathspec. 3. `git_index_update_all` updates entries in the index based on the current contents of the working directory, either added the new information or removing the entry from the index.
* introduce git_conflict_iteratorEdward Thomson2013-05-171-6/+40
|
* Update index.h docsRussell Belfer2013-05-151-30/+45
| | | | | | | | Move the git_index_entry to the very top, since it provides the main structure that needs to be understood by the reader, then move the bitmasks for the flags and the flags_extended under that since they are details for looking at particular fields of the structure.
* Remove entry dup/free functions and fix commentsRussell Belfer2013-05-151-38/+8
| | | | | | This removes the functions to duplicate and free copies of a git_index_entry and updates the comments to explain that you should just use the public definition of the struct as needed.
* Add APIs to dup and free git_index_entrysRussell Belfer2013-05-151-12/+36
| | | | | | | | This adds git_index_entry_dup to make a copy of an existing entry and git_index_entry_free to release the memory of the copy. It also updates the documentation for git_index_get_bypath and git_index_get_byindex to make it clear that the returned structure should *not* be modified.
* Improve docs for git_index_entry flag masksRussell Belfer2013-05-151-18/+40
| | | | | | | The constants for extracting data from git_index_entry flags and flags_extended are not named in a way that makes it easy to know where to use each one. This improves the docs for the flags (and slightly reorganizes them), so it should be more obvious.
* Fix checkout of submodules with no .gitmodulesRussell Belfer2013-05-151-0/+2
| | | | | | | | | It is possible for there to be a submodule in a repository with no .gitmodules file (for example, if the user forgot to commit the .gitmodules file). In this case, core Git will just create an empty directory as a placeholder for the submodule but otherwise ignore it. We were generating an error and stopping the checkout. This makes our behavior match that of core git.
* move NAME and REUC extensions to sys/Edward Thomson2013-04-301-156/+0
|
* renames!Edward Thomson2013-04-301-0/+53
|
* merge!Edward Thomson2013-04-301-3/+3
|
* clear REUC on checkoutEdward Thomson2013-03-041-0/+8
|
* index: Enhance documentationnulltoken2013-02-051-2/+3
|
* Vector improvements and their falloutPhilip Kelley2013-01-271-4/+6
|
* add an index_remove_bypath that removes conflicts, renamed add_from_workdir ↵Edward Thomson2013-01-121-2/+18
| | | | to match
* update copyrightsEdward Thomson2013-01-081-1/+1
|
* Add index API to remove all files in a directoryRussell Belfer2013-01-041-0/+11
| | | | This adds the git_index_remove_directory API plus tests.
* Fix warnings on Win64 buildRussell Belfer2012-11-271-1/+1
|
* Fix up some missing consts in tree & indexRussell Belfer2012-11-271-4/+6
| | | | | | | | | | | | | This fixes some missed places where we can apply const-ness to various public APIs. There are still some index and tree APIs that cannot take const pointers because we sort our `git_vectors` lazily and so we can't reliably bsearch the index and tree content without applying a `git_vector_sort()` first. This also fixes some missed places where size_t can be used and where const can be applied to a couple internal functions.
* API updates for index.hBen Straub2012-11-271-38/+39
|
* index: prevent tree creation from a non merged statenulltoken2012-11-091-2/+8
| | | | Fix libgit2/libgit2sharp#243
* index: Introduce git_index_has_conflicts()nulltoken2012-11-081-0/+7
|
* index: Add `git_index_new`index-open-cleanupVicent Marti2012-11-011-0/+13
|
* index: Add git_index_write_treeVicent Marti2012-11-011-0/+32
|
* index refactoringEdward Thomson2012-10-291-88/+208
|
* index: introduce git_index_owner()nulltoken2012-10-261-0/+8
|
* index: remove read_tree() progress indicatornulltoken2012-10-191-2/+1
| | | | | | | | git_index_read_tree() was exposing a parameter to provide the user with a progress indicator. Unfortunately, due to the recursive nature of the tree walk, the maximum number of items to process was unknown. Thus, the indicator was only counting processed entries, without providing any information how the number of remaining items.
* Merge pull request #778 from ben/cloneVicent Martí2012-08-191-3/+6
|\ | | | | Clone
| * 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.
* | portability: Improve x86/amd64 compatibilitynulltoken2012-07-241-2/+2
|/