summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #2183 from ethomson/merge_refactorVicent Marti2014-03-248-414/+403
|\ | | | | Refactor the `git_merge` API
| * UNBORN implies FAST_FORWARDEdward Thomson2014-03-201-1/+1
| |
| * Introduce GIT_MERGE_ANALYSIS_UNBORNEdward Thomson2014-03-201-10/+25
| |
| * git_merge_status -> git_merge_analysisEdward Thomson2014-03-201-5/+5
| |
| * Remove `git_merge_result` as it's now unnecessaryEdward Thomson2014-03-202-57/+1
| |
| * Update git_merge_tree_opts to git_merge_optionsEdward Thomson2014-03-203-28/+28
| |
| * Change signature of `git_merge` to take merge and checkout optsEdward Thomson2014-03-201-38/+26
| |
| * Remove fastforward / uptodate from `git_merge`Edward Thomson2014-03-202-85/+25
| |
| * Add `git_merge_status` to provide info about an upcoming mergeEdward Thomson2014-03-201-9/+74
| |
| * Introduce git_merge_file for consumersEdward Thomson2014-03-206-206/+243
| |
* | settings: use git_buf for returning stringsCarlos Martín Nieto2014-03-241-6/+14
| | | | | | | | | | This survived the last round of culling, as the signature is only in the comments.
* | Fix wrong assertionLinquize2014-03-211-1/+1
| | | | | | | | Fixes issue #2196
* | Merge pull request #2195 from libgit2/cmn/revwalk-no-hideVicent Marti2014-03-203-5/+22
|\ \ | | | | | | revwalk: don't try to find merge bases when there can be none
| * | revwalk: don't try to find merge bases when there can be noneCarlos Martín Nieto2014-03-203-5/+22
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As a way to speed up the cases where we need to hide some commits, we find out what the merge bases are so we know to stop marking commits as uninteresting and avoid walking down a potentially very large amount of commits which we will never see. There are however two oversights in current code. The merge-base finding algorithm fails to recognize that if it is only given one commit, there can be no merge base. It instead walks down the whole ancestor chain needlessly. Make it return an empty list immediately in this situation. The revwalk does not know whether the user has asked to hide any commits at all. In situation where the user pushes multiple commits but doesn't hide any, the above fix wouldn't do the trick. Keep track of whether the user wants to hide any commits and only run the merge-base finding algorithm when it's needed.
* | reflog: remove some dead codeCarlos Martín Nieto2014-03-201-3/+0
| |
* | reflog: follow core.logallrefupdatesCarlos Martín Nieto2014-03-201-10/+31
|/ | | | | On bare by default, or when core.logallrefupdates is false, we must not write the reflog.
* reflog: handle symref chainsCarlos Martín Nieto2014-03-191-3/+33
| | | | | Given HEAD -> master -> foo, when updating foo's reflog we should also update HEAD's, as it's considered the current branch.
* reflog: handle the birth of a branchCarlos Martín Nieto2014-03-191-18/+24
| | | | | | The reflog append function was overzealous in its checking. When passed an old and new ids, it should not do any checking, but just serialize the data to a reflog entry.
* reflog: simplify the append logicCarlos Martín Nieto2014-03-191-22/+7
| | | | Remove some duplicated logic.
* refdb: don't update when there's no needCarlos Martín Nieto2014-03-191-0/+17
| | | | | If the caller wants to update a ref to point to the same target as it currently has, we should return early and avoid writing to the reflog.
* reflog: more comprehensive HEAD testsCarlos Martín Nieto2014-03-181-4/+4
| | | | | | | | | The existing ones lack checking zeroed ids when switching back from an unborn branch as well as what happens when detaching. The reflog appending function mistakenly wrote zeros when dealing with a detached HEAD. This explicitly checks for those situations and fixes them.
* Merge pull request #2189 from Aimeast/octopusVicent Marti2014-03-181-0/+25
|\ | | | | Implement git_merge_base_octopus
| * Implement git_merge_base_octopusAimeast2014-03-181-0/+25
| |
* | Merge pull request #2192 from phkelley/developmentVicent Marti2014-03-181-19/+102
|\ \ | |/ |/| Seamless support for NTLM/Kerberos auth on Windows
| * Seamless support for NTLM/Kerberos auth on WindowsPhilip Kelley2014-03-181-19/+102
| |
* | refs: append to the HEAD reflog when updating the current branchCarlos Martín Nieto2014-03-171-21/+84
| | | | | | | | | | | | | | | | When we update the current branch, we must also append to HEAD's reflog to keep them in sync. This is a bit of a hack, but as git.git says, it covers 100% of default cases.
* | branch: constness fixesCarlos Martín Nieto2014-03-172-2/+2
|/
* Fix pqueue sort boundary condition bugRussell Belfer2014-03-121-1/+1
| | | | | | If the pqueue comparison fn returned just 0 or 1 (think "a<b") then the sort order of returned items could be wrong because there was a "< 0" that really needed to be "<= 0". Yikes!!!
* MSVC is sillyCarlos Martín Nieto2014-03-101-2/+2
|
* Merge pull request #2175 from Yogu/submodule-resolve-urlVicent Marti2014-03-101-10/+20
|\ | | | | Add git_submodule_resolve_url()
| * Add git_submodule_resolve_url()Jan Melcher2014-03-101-10/+20
| |
* | corrected typo in error messageBrendan Forster2014-03-101-1/+1
|/
* Merge pull request #2028 from libgit2/options-namesVicent Marti2014-03-076-31/+31
|\ | | | | Rename options structures
| * git_revert_opts -> git_revert_optionsoptions-namesBen Straub2014-03-061-12/+12
| |
| * git_checkout_opts -> git_checkout_optionsBen Straub2014-03-065-19/+19
| |
* | Merge pull request #2167 from mekishizufu/memory_access_fixesVicent Marti2014-03-072-21/+18
|\ \ | | | | | | Fun with memory access
| * | blame: Fix compare function's data typesJiri Pospisil2014-03-071-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the hunk_byfinalline_search_cmp function was called with different data types (size_t and uint32_t) for the key argument but expected only the former resulting in an invalid memory access when passed the latter on a 64 bit machine. The following patch makes sure that the function is called and works with the same type (size_t).
| * | git_oid_fromstrn: Simplify the implementation and fix memory access issuesJiri Pospisil2014-03-071-15/+9
| |/
* | Plug a few leaks in the testsCarlos Martín Nieto2014-03-072-1/+5
| |
* | branch: fix leak when checking against HEADCarlos Martín Nieto2014-03-071-5/+11
| | | | | | | | | | | | | | | | We look up a reference in order to figure out if it's the current branch, which we need to free once we're done with the check. As a bonus, only perform the check when we're passed the force flag, as it's a useless check otherwise.
* | commit: simplify and correct refcounting in nth_gen_ancestorCarlos Martín Nieto2014-03-071-9/+8
| | | | | | | | | | | | | | | | We can make use of git_object_dup to use refcounting instead of pointer comparison to make sure we don't free the caller's object. This also lets us simplify the case for '~0' which is now just an assignment instead of looking up the object we have at hand.
* | local transport: catch double-opensCarlos Martín Nieto2014-03-071-0/+3
|/ | | | | Combinations of connect + fetch can call local_open multiple times. Detect this and skip the initialization stage.
* Added function-based initializers for every options struct.Matthew Bowen2014-03-0514-0/+190
| | | | The basic structure of each function is courtesy of arrbee.
* Merge pull request #2159 from libgit2/rb/odb-exists-prefixVicent Marti2014-03-064-10/+140
|\ | | | | Add ODB API to check for existence by prefix and object id shortener
| * Check short OID len in odb, not in backendsRussell Belfer2014-03-052-10/+3
| |
| * Add git_object_short_id API to get short id stringRussell Belfer2014-03-041-0/+43
| | | | | | | | | | | | This finds a short id string that will unambiguously select the given object, starting with the core.abbrev length (usually 7) and growing until it is no longer ambiguous.
| * Add exists_prefix to ODB backend and ODB APIRussell Belfer2014-03-043-4/+98
| |
* | Merge pull request #2164 from libgit2/cmn/refs-delete-iterationVicent Marti2014-03-052-2/+13
|\ \ | | | | | | refdb: catch a directory disappearing
| * | refdb: catch a directory disappearingCarlos Martín Nieto2014-03-052-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | If a directory disappears between the time we look up the entries of its parent and the time when we go to look at it, we should ignore the error and move forward. This fixes #2046.
* | | Merge pull request #2163 from ethomson/nobackend_odb_writeVicent Marti2014-03-051-6/+12
|\ \ \ | |/ / |/| | ODB writing fails gracefully when unsupported