summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * Add higher level pathspec APIRussell Belfer2013-06-192-0/+39
| | | | | | | | | | | | | | | | | | Right now, setting up a pathspec to be parsed and processed requires several data structures and a couple of API calls. This adds a new high level data structure that contains all the items that you'll need and high-level APIs that do all of the setup and all of the teardown. This will make it easier to use pathspecs in various places with less repeated code.
* | Merge pull request #1660 from trast/tr/fix-zlib-configurationVicent Martí2013-06-191-6/+4
|\ \ | |/ |/| CMakeLists: fix zlib linker setup
| * CMakeLists: fix zlib linker setupThomas Rast2013-06-191-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | b53671a (Search for zlib unconditional, 2012-12-18) changed things around to always (even on windows, that's what the subject refers to) call FIND_PACKAGE(ZLIB). However, it did not correctly handle the case where ZLIB_LIBRARY is cached, either by the user setting it manually or by an earlier search. In that case, the IF(ZLIB_FOUND) would not trigger (that variable is not cached) and we'd instead use the built-in version. 000e689 (CMake: don't try to use bundled zlib when the system's path is in the cache, 2013-05-12) tried to fix that, but it actually made the problem worse: now with ZLIB_LIBRARY cached, _neither_ of the blocks would execute, resulting in a linker error for me when trying to build such a doubly-configured setup. To fix the issue, we just trust CMake to do the right thing. If ZLIB_LIBRARY is set (either from user or cache) then the find_library in FindZLIB.cmake will use that instead of searching again. So we can unconditionally (for real this time) call FIND_PACKAGE(ZLIB), and just check its result.
* | Merge pull request #1659 from arrbee/rename-cycle-fixesVicent Martí2013-06-188-109/+282
|\ \ | | | | | | Diff rename detection cycle fixes
| * | Fix rename looped reference issuesRussell Belfer2013-06-183-111/+152
| | | | | | | | | | | | | | | | | | | | | This makes the diff rename tracking code more careful about the order in which it processes renames and more thorough in updating the mapping of correct renames when an earlier rename update alters the index of a later matched pair.
| * | test illustrating tri-cyclic rename failureEdward Thomson2013-06-181-0/+53
| | |
| * | test failure when renames produce similar similaritiesEdward Thomson2013-06-186-0/+79
|/ /
* | Merge pull request #1657 from arrbee/diff-blob-as-pathVicent Martí2013-06-186-241/+636
|\ \ | | | | | | Add "as_path" parameters to blob and buffer diff APIs
| * | Add "as_path" parameters to blob and buffer diffsRussell Belfer2013-06-176-241/+636
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds parameters to the four functions that allow for blob-to- blob and blob-to-buffer differencing (either via callbacks or by making a git_diff_patch object). These parameters let you say that filename we should pretend the blob has while doing the diff. If you pass NULL, there should be no change from the existing behavior, which is to skip using attributes for file type checks and just look at content. With the parameters, you can plug into the new diff driver functionality and get binary or non-binary behavior, plus function context regular expressions, etc. This commit also fixes things so that the git_diff_delta that is generated by these functions will actually be populated with the data that we know about the blobs (or buffers) so you can use it appropriately. It also fixes a bug in generating patches from the git_diff_patch objects created via these functions. Lastly, there is one other behavior change that may matter. If there is no difference between the two blobs, these functions no longer generate any diff callbacks / patches unless you have passed in GIT_DIFF_INCLUDE_UNMODIFIED. This is pretty natural, but could potentially change the behavior of existing usage.
* | Merge pull request #1651 from arrbee/status_indexed_updatesRussell Belfer2013-06-1721-261/+1255
|\ \ | | | | | | Status indexed updates
| * | Update clar to latest versionRussell Belfer2013-06-172-24/+36
| | |
| * | Fix memory leaks in diff rename testsRussell Belfer2013-06-172-6/+11
| | | | | | | | | | | | | | | | | | This fixes a couple objects I forgot to free, and also updates the valgrind suppressions file on the Mac to cover a few more cases that had crept in.
| * | Add test of rename with no changesRussell Belfer2013-06-171-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | A tree to index rename with no changes was getting erased by the iteration routine (if the routine actually loaded the data for the unmodified file). This invokes the code path that was previously messing up the diff and iterates twice to make sure that the iteration process itself doesn't modify the data.
| * | More tests and bug fixes for status with renameRussell Belfer2013-06-176-80/+237
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the behavior of the status RENAMED flags so that they will be combined with the MODIFIED flags if appropriate. If a file is modified in the index and also renamed, then the status code will have both the GIT_STATUS_INDEX_MODIFIED and INDEX_RENAMED bits set. If it is renamed but the OID has not changed, then just the GIT_STATUS_INDEX_RENAMED bit will be set. Similarly, the flags GIT_STATUS_WT_MODIFIED and GIT_STATUS_WT_RENAMED can both be set independently of one another. This fixes a serious bug where the check for unmodified files that was done at data load time could end up erasing the RENAMED state of a file that was renamed with no changes. Lastly, this contains a bunch of new tests for status with renames, including tests where the only rename changes are case changes. The expected results of these tests have to vary by whether the platform uses a case sensitive filesystem or not, so the expected data covers those platform differences separately.
| * | Test has to work on case sensitive systemsRussell Belfer2013-06-171-3/+14
| | |
| * | Always do tree to index diffs case sensitivelyRussell Belfer2013-06-171-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Trees are always case sensitive. The index is always case preserving and will be case sensitive when it is turned into a tree. Therefore the tree and the index can and should always be compared to one another case sensitively. This will restore the index to case insensitive order after the diff has been generated. Consider this a short-term fix. The long term fix is to have the index always stored both case sensitively and case insensitively (at least on platforms that sometimes require case insensitivity).
| * | Make index_insert keep existing caseRussell Belfer2013-06-172-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | In a case insensitive index, if you attempt to add a file from disk with a different case pattern, the old case pattern in the index should be preserved. This fixes that (and a couple of minor warnings).
| * | some simple case-sensitive index testsEdward Thomson2013-06-172-0/+64
| | |
| * | Improve case handling in git_diff__paired_foreachRussell Belfer2013-06-175-114/+193
| | | | | | | | | | | | | | | | | | | | | | | | This commit reinstates some changes to git_diff__paired_foreach that were discarded during the rebase (because the diff_output.c file had gone away), and also adjusts the case insensitively logic slightly to hopefully deal with either mismatched icase diffs and other case insensitivity scenarios.
| * | Be more careful about the path with diffsRussell Belfer2013-06-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | This makes diff more careful about picking the canonical path when generating a delta so that it won't accidentally pick up a case-mismatched path on a case-insensitive file system. This should make sure we use the "most accurate" case correct version of the path (i.e. from the tree if possible, or the index if need be).
| * | Fix broken status EXCLUDE_SUBMODULES logicRussell Belfer2013-06-171-11/+21
| | | | | | | | | | | | | | | | | | | | | The exclude submodules flag was not doing the right thing, in that a file with no diff between the head and the index and just a delete in the workdir could be excluded if submodules were excluded.
| * | Clarify some docs and minor reorderingRussell Belfer2013-06-171-92/+89
| | | | | | | | | | | | | | | | | | | | | This simplifies some documentation and hopefully makes a couple of things easier to read. Also, this rearrages the order in this branch so that the overall diff against the trunk will hopefully be a bit cleaner.
| * | Fix some warningsRussell Belfer2013-06-171-9/+6
| | |
| * | git__strcasesort_cmp: strcasecmp sorting rules but requires strict equalityEdward Thomson2013-06-173-0/+40
| | |
| * | handle renames in status computationEdward Thomson2013-06-173-21/+371
| | |
| * | status access by index, providing more details to callersEdward Thomson2013-06-174-66/+255
|/ /
* | branch: More obvious semantics in `foreach`Vicent Marti2013-06-171-1/+5
| |
* | Merge pull request #1655 from yorah/fix/ref-memleakVicent Martí2013-06-172-5/+3
|\ \ | | | | | | ref: free the last ref when cancelling git_branch_foreach()
| * | ref: free the last ref when cancelling git_branch_foreach()yorah2013-06-172-5/+3
|/ / | | | | | | Also fixed an assert typo on nulltoken's HEAD
* | Merge pull request #1654 from yorah/memzeroVicent Martí2013-06-173-12/+13
|\ \ | |/ |/| Memzero stuffs
| * cred: deploy git__memzero to clear memory holding a passwordyorah2013-06-171-2/+2
| |
| * util: git__memzero() tweaksyorah2013-06-172-10/+11
|/ | | | | | | On Linux: fix a warning message related to the volatile qualifier (cast) On Windows: use SecureZeroMemory() On both, inline the call, so that no entry point can lead back to this "secure" memory zeroing.
* Merge pull request #1652 from yorah/fix/build-warningsVicent Martí2013-06-142-1/+3
|\ | | | | Fix/build warnings
| * diff: fix warningyorah2013-06-141-0/+2
| |
| * fileops: fix invalid readyorah2013-06-141-1/+1
|/
* Merge pull request #1650 from nulltoken/ntk/winrc-filenameVicent Martí2013-06-132-17/+10
|\ | | | | cmake: Add option to specify the name of the binary
| * cmake: Add option to specify the name of the binarynulltoken2013-06-132-9/+9
| |
| * Revert "cmake: Update Windows resources to reflect the optional vendor string"Vicent Marti2013-06-122-12/+5
|/ | | | This reverts commit 095bfd748766966f5515bdfe64867d6a09287123.
* util: It's called `memzero`Vicent Marti2013-06-129-13/+12
|
* Merge remote-tracking branch 'arrbee/minor-paranoia' into developmentVicent Marti2013-06-1213-16/+63
|\
| * Add safe memset and use itRussell Belfer2013-06-079-13/+26
| | | | | | | | | | | | This adds a `git__memset` routine that will not be optimized away and updates the places where I memset() right before a free() call to use it.
| * Mutex init can failRussell Belfer2013-05-315-6/+26
| | | | | | | | | | | | | | It is obviously quite a serious problem if this happens, but mutex initialization can fail and we should detect it. It's a bit like a memory allocation failure, in that you're probably pretty screwed if this occurs, but at least we'll catch it.
| * Zero memory for major objects before freeingRussell Belfer2013-05-318-4/+18
| | | | | | | | | | | | | | By zeroing out the memory when we free larger objects (i.e. those that serve as collections of other data, such as repos, odb, refdb), I'm hoping that it will be easier for libgit2 bindings to find errors in their object management code.
* | Merge pull request #1647 from arrbee/fix-win32-warnings-part-112Russell Belfer2013-06-128-11/+16
|\ \ | | | | | | Fix Windows warnings and missing prototypes
| * | Fix Windows warningsRussell Belfer2013-06-128-11/+16
|/ / | | | | | | | | This fixes problems with missing function prototypes and 64-bit data issues on Windows.
* | Merge pull request #1643 from ethomson/rename_sourceVicent Martí2013-06-127-17/+117
|\ \ | | | | | | Keep data about source of similarity
| * | keep source similarity in rename detectionEdward Thomson2013-06-101-17/+23
| | |
| * | failing unit test for similar renamesEdward Thomson2013-06-106-0/+94
| | |
* | | Merge pull request #1642 from arrbee/diff-function-contextVicent Martí2013-06-1258-2033/+3280
|\ \ \ | | | | | | | | Diff code reorg plus function context in diff headers
| * | | Fix diff header naming issuesRussell Belfer2013-06-126-95/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes the git_diff_patch definition private to diff_patch.c and fixes a number of other header file naming inconsistencies to use `git_` prefixes on functions and structures that are shared between files.