summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Merge pull request #2204 from libgit2/rb/submodule-reference-countingVicent Marti2014-03-265-95/+220
|\ \ \ | |_|/ |/| | Make submodules externally refcounted
| * | Fix submodule leaks and invalid referencesRussell Belfer2014-03-254-30/+105
| | | | | | | | | | | | | | | | | | | | | This cleans up some places I missed that could hold onto submodule references and cleans up the way in which the repository cache is both reloaded and released so that existing submodule references aren't destroyed inappropriately.
| * | Make submodules externally refcountedRussell Belfer2014-03-255-65/+115
| | | | | | | | | | | | | | | | | | | | | | | | `git_submodule` objects were already refcounted internally in case the submodule name was different from the path at which it was stored. This makes that refcounting externally used as well, so `git_submodule_lookup` and `git_submodule_add_setup` return an object that requires a `git_submodule_free` when done.
* | | Merge pull request #2205 from libgit2/rb/submodule-untracked-vs-ignoredVicent Marti2014-03-262-11/+4
|\ \ \ | | | | | | | | Update behavior for untracked contained repositories
| * | | Update behavior for untracked sub-reposRussell Belfer2014-03-252-11/+4
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a directory containing a .git directory (or even just a plain gitlink) was found, libgit2 was going out of its way to treat it specially. This seemed like it was necessary because the diff code was not originally emulating Git's behavior for untracked directories correctly (i.e. scanning for ignored vs untracked items inside). Now that libgit2 diff mimics Git's untracked directory behavior, the special handling for contained Git repos is actually incorrect and this commit rips it out.
* | | clone: don't overwrite original error messageEdward Thomson2014-03-251-0/+5
| | |
* | | Merge pull request #2181 from anuraggup/hide_cbEdward Thomson2014-03-252-5/+29
|\ \ \ | |/ / |/| | Callback function to hide commit and its parents in revision walker
| * | Conforming to libgit2 coding style.Anurag Gupta2014-03-241-4/+1
| | |
| * | Remove unused push_cb_dataAnurag Gupta2014-03-241-5/+0
| | |
| * | Callback to hide commits in revision walker.Anurag Gupta2014-03-242-0/+32
| | |
* | | 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.