summaryrefslogtreecommitdiff
path: root/src/merge.c
Commit message (Collapse)AuthorAgeFilesLines
* common: use PRIuZ for size_t in `giterr_set` callsPatrick Steinhardt2016-11-141-1/+1
|
* git_diff_generated: abstract generated diffsEdward Thomson2016-05-261-0/+2
|
* Ignore submodules when checking for merge conflicts in the workdir.Jason Haslam2016-05-261-0/+1
|
* merge drivers: handle configured but not found driverEdward Thomson2016-03-171-4/+13
|
* merge driver: remove `check` callbackEdward Thomson2016-03-171-19/+18
| | | | | | Since the `apply` callback can defer, the `check` callback is not necessary. Removing the `check` callback further makes the `payload` unnecessary along with the `cleanup` callback.
* merge driver: correct global initializationEdward Thomson2016-03-171-0/+1
|
* merge driver: get a pointer to favorEdward Thomson2016-03-171-1/+1
|
* merge driver: correct indentationEdward Thomson2016-03-171-13/+13
|
* merge driver: allow custom default driverEdward Thomson2016-03-171-6/+34
| | | | | | Allow merge users to configure a custom default merge driver via `git_merge_options`. Similarly, honor the `merge.default` configuration option.
* merge driver: introduce custom merge driversEdward Thomson2016-03-171-78/+112
| | | | | | | | Consumers can now register custom merged drivers with `git_merge_driver_register`. This allows consumers to support the merge drivers, as configured in `.gitattributes`. Consumers will be asked to perform the file-level merge when a custom driver is configured.
* Fix rebase bug and include test for merge=unionStan Hu2016-03-171-1/+1
|
* Support union merges via .gitattributes fileStan Hu2016-03-171-0/+26
|
* Horrible fix for #3173.Arthur Schreiber2016-02-111-7/+7
|
* merge: fix memory leakPatrick Steinhardt2016-02-081-3/+2
|
* merge: Use `git_index__fill` to populate the indexvmg/index-fillVicent Marti2015-12-161-5/+2
| | | | | | | | | | | | | Instead of calling `git_index_add` in a loop, use the new `git_index_fill` internal API to fill the index with the initial staged entries. The new `fill` helper assumes that all the entries will be unique and valid, so it can append them at the end of the entries vector and only sort it once at the end. It performs no validation checks. This prevents the quadratic behavior caused by having to sort the entries list once after every insertion.
* recursive merge: add a recursion limitEdward Thomson2015-11-251-3/+10
|
* merge: handle conflicts in recursive base buildingEdward Thomson2015-11-251-19/+48
| | | | | | | | | | | | | | | | | When building a recursive merge base, allow conflicts to occur. Use the file (with conflict markers) as the common ancestor. The user has already seen and dealt with this conflict by virtue of having a criss-cross merge. If they resolved this conflict identically in both branches, then there will be no conflict in the result. This is the best case scenario. If they did not resolve the conflict identically in the two branches, then we will generate a new conflict. If the user is simply using standard conflict output then the results will be fairly sensible. But if the user is using a mergetool or using diff3 output, then the common ancestor will be a conflict file (itself with diff3 output, haha!). This is quite terrible, but it matches git's behavior.
* merge: use annotated commits for recursionEdward Thomson2015-11-251-59/+83
| | | | | | | Use annotated commits to act as our virtual bases, instead of regular commits, to avoid polluting the odb with virtual base commits and trees. Instead, build an annotated commit with an index and pointers to the commits that it was merged from.
* merge: merge annotated commits instead of regular commitsEdward Thomson2015-11-251-156/+125
|
* merge: octopus merge common ancestors when >2Edward Thomson2015-11-251-119/+165
| | | | | | When there are more than two common ancestors, continue merging the virtual base with the additional common ancestors, effectively octopus merging a new virtual base.
* merge: compute octopus merge basesEdward Thomson2015-11-251-89/+100
|
* merge: build virtual base of multiple merge basesEdward Thomson2015-11-251-10/+123
| | | | | When the commits to merge have multiple common ancestors, build a "virtual" base tree by merging the common ancestors.
* merge: rename `git_merge_tree_flags_t` -> `git_merge_flags_t`Edward Thomson2015-11-251-6/+6
|
* merge-base: StyleVicent Marti2015-11-021-1/+6
|
* merge-base: Do not read parents from the rootVicent Marti2015-11-021-1/+1
|
* merge-base: Remove redundant merge basesVicent Marti2015-11-021-22/+165
|
* merge: Do not mallocz unecessary entriesvmg/poolVicent Marti2015-10-281-2/+2
|
* pool: Dot not assume mallocs are zeroed outVicent Marti2015-10-281-4/+4
|
* pool: Simplify implementationVicent Marti2015-10-281-3/+3
|
* merge: Plug memory leakvmg/reuc-insertVicent Marti2015-10-271-3/+3
|
* merge: Implement `GIT_MERGE_TREE_SKIP_REUC`Vicent Marti2015-10-271-28/+43
|
* merge: add GIT_MERGE_TREE_FAIL_ON_CONFLICTEdward Thomson2015-10-221-1/+8
| | | | | | Provide a new merge option, GIT_MERGE_TREE_FAIL_ON_CONFLICT, which will stop on the first conflict and fail the merge operation with GIT_EMERGECONFLICT.
* diff: don't feed large files to xdiffEdward Thomson2015-10-051-1/+0
|
* merge_file: treat large files as binaryEdward Thomson2015-10-051-55/+0
| | | | | | | | xdiff craps the bed on large files. Treat very large files as binary, so that it doesn't even have to try. Refactor our merge binary handling to better match git.git, which looks for a NUL in the first 8000 bytes.
* diff: drop `FILELIST_MATCH`Edward Thomson2015-08-301-1/+1
| | | | | Now that non-pathspec matching diffs are implemented at the iterator level, drop `FILELIST_MATCH`ing.
* diff: use new iterator pathlist handlingEdward Thomson2015-08-301-1/+2
| | | | | | | | When using literal pathspecs in diff with `GIT_DIFF_DISABLE_PATHSPEC_MATCH` turn on the faster iterator pathlist handling. Updates iterator pathspecs to include directory prefixes (eg, `foo/`) for compatibility with `GIT_DIFF_DISABLE_PATHSPEC_MATCH`.
* Move filelist into the iterator handling itself.Edward Thomson2015-08-281-3/+2
|
* iterator: use an options struct instead of argsEdward Thomson2015-08-281-11/+24
|
* Fix #3094 - improve use of portable size_t/ssize_t format specifiers.Matthew Plough2015-07-121-3/+3
| | | | The header src/cc-compat.h defines portable format specifiers PRIuZ, PRIdZ, and PRIxZ. The original report highlighted the need to use these specifiers in examples/network/fetch.c. For this commit, I checked all C source and header files not in deps/ and transitioned to the appropriate format specifier where appropriate.
* iterator: provide git_iterator_walkEdward Thomson2015-06-251-86/+30
| | | | | Provide `git_iterator_walk` to walk each iterator in lockstep, returning each iterator's idea of the contents of the next path.
* merge: actually increment the counts, not the pointersCarlos Martín Nieto2015-06-101-2/+2
| | | | | | | | `merge_diff_list_count_candidates()` takes pointers to the source and target counts, but when it comes time to increase them, we're increasing the pointer, rather than the value it's pointing to. Dereference the value to increase.
* Rename GIT_EMERGECONFLICT to GIT_ECONFLICTEdward Thomson2015-05-291-1/+1
| | | | | | | | | | We do not error on "merge conflicts"; on the contrary, merge conflicts are a normal part of merging. We only error on "checkout conflicts", where a change exists in the index or the working directory that would otherwise be overwritten by performing the checkout. This *may* happen during merge (after the production of the new index that we're going to checkout) but it could happen during any checkout.
* introduce `git_index_entry_is_conflict`Edward Thomson2015-05-281-2/+2
| | | | | | | | | It's not always obvious the mapping between stage level and conflict-ness. More importantly, this can lead otherwise sane people to write constructs like `if (!git_index_entry_stage(entry))`, which (while technically correct) is unreadable. Provide a nice method to help avoid such messy thinking.
* merge: merge iteratorsEdward Thomson2015-05-111-20/+66
|
* Merge pull request #2967 from jacquesg/merge-whitespaceEdward Thomson2015-03-181-6/+10
|\ | | | | Allow merges of files (and trees) with whitespace problems/fixes
| * Collapse whitespace flags into git_merge_file_flags_tJacques Germishuys2015-03-161-5/+5
| |
| * Renamed git_merge_options 'flags' to 'tree_flags'Jacques Germishuys2015-03-161-2/+2
| |
| * Allow for merges with whitespace discrepanciesJacques Germishuys2015-03-161-4/+8
| |
* | PERF: In MERGE, lazily compute is_binaryJeff Hostetler2015-03-161-8/+19
|/
* Merge pull request #2831 from ethomson/merge_lockCarlos Martín Nieto2015-02-151-11/+14
|\ | | | | merge: lock index during the merge (not just checkout)