summaryrefslogtreecommitdiff
path: root/src/index.c
Commit message (Collapse)AuthorAgeFilesLines
...
| * Make sure error messages get setRussell Belfer2013-05-011-2/+7
| |
* | fix some leaksEdward Thomson2013-05-021-0/+1
| |
* | Fix some compile warnings and trailing whitespaceRussell Belfer2013-05-021-10/+12
| |
* | merge: Warning noiseVicent Marti2013-05-011-0/+3
| |
* | move NAME and REUC extensions to sys/Edward Thomson2013-04-301-0/+1
| |
* | renames!Edward Thomson2013-04-301-0/+218
| |
* | merge!Edward Thomson2013-04-301-8/+11
|/
* Make git_oid_cmp public and add git_oid__cmpRussell Belfer2013-04-291-1/+1
|
* Use config cache where possibleRussell Belfer2013-04-231-9/+8
| | | | | | This converts many of the config lookups that are done around the library to use the repository config cache. This was everything I could find that wasn't part of diff (which requires a larger fix).
* Fix uninitialized var warningsRussell Belfer2013-04-181-1/+1
|
* Several warnings detected by static code analyzer fixedArkadiy Shapkin2013-03-181-3/+3
| | | | | | | Implicit type conversion argument of function to size_t type Suspicious sequence of types castings: size_t -> int -> size_t Consider reviewing the expression of the 'A = B == C' kind. The expression is calculated as following: 'A = (B == C)' Unsigned type is never < 0
* Make iterator APIs consistent with standardsRussell Belfer2013-03-061-51/+0
| | | | | | | | | | | | The iterator APIs are not currently consistent with the parameter ordering of the rest of the codebase. This rearranges the order of parameters, simplifies the naming of a number of functions, and makes somewhat better use of macros internally to clean up the iterator code. This also expands the test coverage of iterator functionality, making sure that case sensitive range-limited iteration works correctly.
* Merge pull request #1380 from phkelley/index_icaseVicent Martí2013-03-041-2/+4
|\ | | | | Disable ignore_case when writing the index to a tree
| * Rename function to __ prefixPhilip Kelley2013-03-011-2/+2
| |
| * Disable ignore_case when writing the index to a treePhilip Kelley2013-03-011-2/+4
| |
* | clear REUC on checkoutEdward Thomson2013-03-041-19/+18
|/
* add a sorter to the reuc on index creationEdward Thomson2013-02-211-1/+2
|
* Merge pull request #1190 from nulltoken/topic/reset-pathsRussell Belfer2013-02-111-1/+1
|\ | | | | reset: Allow the selective reset of pathspecs
| * index: Fix indentationsnulltoken2013-02-051-1/+1
| |
* | Return the matched pathspec pattern in `git_pathspec_match_path`yorah2013-02-071-1/+2
|/ | | | | | | Instead of returning directly the pattern as the return value, I used an out parameter, because the function also tests if the passed pathspecs vector is empty. If yes, it considers that the path "matches", but in that case there is no matched pattern per se.
* Vector improvements and their falloutPhilip Kelley2013-01-271-34/+35
|
* index: Speed up loading a tree into the indexScott J. Goldman2013-01-241-3/+8
| | | | | | The index is empty; repeated tree entries cannot collide. cc github/gitrpc#83
* add an index_remove_bypath that removes conflicts, renamed add_from_workdir ↵Edward Thomson2013-01-121-1/+16
| | | | to match
* REUC needs to handle empty sidesEdward Thomson2013-01-101-6/+6
|
* update copyrightsEdward Thomson2013-01-081-1/+1
|
* Add index API to remove all files in a directoryRussell Belfer2013-01-041-0/+38
| | | | This adds the git_index_remove_directory API plus tests.
* missing error message is confusingRussell Belfer2013-01-041-0/+3
|
* Fix git_index sorting with core.ignorecase in git_index_readPhilip Kelley2013-01-041-3/+4
|
* don't walk off the end of the indexEdward Thomson2012-12-121-4/+5
|
* Clean up iterator APIsRussell Belfer2012-12-101-2/+1
| | | | | | | | This removes the need to explicitly pass the repo into iterators where the repo is implied by the other parameters. This moves the repo to be owned by the parent struct. Also, this has some iterator related updates to the internal diff API to lay the groundwork for checkout improvements.
* Fix warnings on Win64 buildRussell Belfer2012-11-271-10/+11
|
* update internal index API to avoid castRussell Belfer2012-11-271-4/+4
|
* Fix up some missing consts in tree & indexRussell Belfer2012-11-271-18/+20
| | | | | | | | | | | | | 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-4/+4
|
* API review / update for tree.hRussell Belfer2012-11-271-1/+1
|
* More external API cleanupVicent Marti2012-11-271-1/+1
| | | | | | Conflicts: src/branch.c tests-clar/refs/branches/create.c
* Add iterator for git_index objectRussell Belfer2012-11-141-1/+3
| | | | | | The index iterator could previously only be created from a repo object, but this allows creating an iterator from a `git_index` object instead (while keeping, though renaming, the old function).
* Fix a few valgrind errorsCarlos Martín Nieto2012-11-131-1/+2
|
* Merge pull request #1016 from arrbee/fix-checkout-dir-removalVicent Martí2012-11-131-3/+72
|\ | | | | Update checkout with new strategies & behavior
| * Fix warnings and valgrind issuesRussell Belfer2012-11-091-1/+1
| | | | | | | | | | This fixes some various warnings that showed up in Travis and a couple uses of uninitialized memory and one memory leak.
| * Rework checkout with new strategy optionsRussell Belfer2012-11-091-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a major reworking of checkout strategy options. The checkout code is now sensitive to the contents of the HEAD tree and the new options allow you to update the working tree so that it will match the index content only when it previously matched the contents of the HEAD. This allows you to, for example, to distinguish between removing files that are in the HEAD but not in the index, vs just removing all untracked files. Because of various corner cases that arise, etc., this required some additional capabilities in rmdir and other utility functions. This includes the beginnings of an implementation of code to read a partial tree into the index based on a pathspec, but that is not enabled because of the possibility of creating conflicting index entries.
| * Some diff refactorings to help code reuseRussell Belfer2012-11-091-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are some diff functions that are useful in a rewritten checkout and this lays some groundwork for that. This contains three main things: 1. Share the function diff uses to calculate the OID for a file in the working directory (now named `git_diff__oid_for_file` 2. Add a `git_diff__paired_foreach` function to iterator over two diff lists concurrently. Convert status to use it. 3. Move all the string/prefix/index entry comparisons into function pointers inside the `git_diff_list` object so they can be switched between case sensitive and insensitive versions. This makes them easier to reuse in various functions without replicating logic. As part of this, move a couple of index functions out of diff.c and into index.c.
* | Merge pull request #1056 from nulltoken/duplicate-tree-entriesVicent Martí2012-11-101-0/+15
|\ \ | | | | | | Duplicate tree entries
| * | index: Introduce git_index_has_conflicts()nulltoken2012-11-081-0/+15
| |/
* | index: prefer INDEX_OWNER usagenulltoken2012-11-101-1/+1
| |
* | index: refine add_from_workdir() error reportnulltoken2012-11-101-24/+24
| |
* | index: make git_index_new() work with a NULL pathnulltoken2012-11-101-1/+1
|/
* freeing index entries would be helpfulEdward Thomson2012-11-021-3/+9
|
* index: Add `git_index_new`index-open-cleanupVicent Marti2012-11-011-0/+5
|
* index: Fix testsVicent Marti2012-11-011-2/+1
|