summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* refspec: git_refspec_parse() does not existCarlos Martín Nieto2014-04-011-1/+0
|
* Merge pull request #2208 from libgit2/vmg/mempackRussell Belfer2014-04-011-0/+182
|\ | | | | In-memory packing backend
| * In-memory packing backendvmg/mempackVicent Marti2014-03-261-0/+182
| |
* | Merge pull request #2226 from libgit2/rb/submodule-sorting-fixEdward Thomson2014-04-014-19/+46
|\ \ | | | | | | Fix submodule sort order during iteration
| * | CleanupsRussell Belfer2014-03-313-4/+4
| | |
| * | Fix submodule sorting in workdir iteratorRussell Belfer2014-03-311-16/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | With the changes to how git_path_dirload_with_stat handles things that look like submodules, submodules could end up sorted in the wrong order with the workdir iterator. This moves the submodule check earlier in the iterator processing of a new directory so that the submodule name updates will happen immediately and the sort order will be correct.
| * | Add faster git_submodule__is_submodule checkRussell Belfer2014-03-312-0/+18
| | |
* | | Merge pull request #2206 from libgit2/cmn/inmemory-swap-orderVicent Marti2014-04-011-4/+4
|\ \ \ | | | | | | | | Rename in-memory remote to anonymous and swap url and fetch order
| * | | remote: rename inmemory to anonymous and swap url and fetch orderCarlos Martín Nieto2014-04-011-4/+4
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | The order in this function is the opposite to what create_with_fetchspec() has, so change this one, as url-then-refspec is what git does. As we need to break compilation and the swap doesn't do that, let's take this opportunity to rename in-memory remotes to anonymous as that's really what sets them apart.
* | | Merge pull request #2178 from libgit2/rb/fix-short-idEdward Thomson2014-03-311-7/+17
|\ \ \ | |_|/ |/| | Fix git_odb_short_id and git_odb_exists_prefix bugs
| * | Fix a number of git_odb_exists_prefix bugsRussell Belfer2014-03-101-7/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The git_odb_exists_prefix API was not dealing correctly when a later backend returned GIT_ENOTFOUND even if an earlier backend had found the object. Additionally, the unit tests were not properly exercising the API and had a couple mistakes in checking the results. Lastly, since the backends are not expected to behavior correctly unless all bytes of the short id are zero except for the prefix, this makes the ODB prefix APIs explicitly clear out the extra bytes so the user doesn't have to be as careful.
* | | Const up members of git_merge_file_resultEdward Thomson2014-03-311-2/+2
| | |
* | | Merge pull request #2222 from ethomson/merge_head_idVicent Marti2014-03-311-0/+8
|\ \ \ | | | | | | | | Introduce git_merge_head_id
| * | | Introduce git_merge_head_idEdward Thomson2014-03-311-0/+8
| | | |
* | | | Don't reset need_packEtienne Samson2014-03-301-1/+2
|/ / / | | | | | | While looping over multiple heads, an up-to-date head will clobber the `remote->need_pack` setting, preventing the rest of the machinery from building and downloading a pack-file, breaking fetches.
* | | Fix memory leak of submodule branch nameRussell Belfer2014-03-271-0/+1
| | |
* | | Fix use-after-free in submodule reloadRussell Belfer2014-03-271-3/+6
| | | | | | | | | | | | | | | | | | If the first call to release a no-longer-existent submodule freed the object, the check if a second is needed would dereference the data that was just freed.
* | | Fix error when submodule path and name differRussell Belfer2014-03-261-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | When a submodule was inserted with a different path and name, the return value from khash greater than zero was allowed to propagate back out to the caller when it should really be zeroed. This led to a possible crash when reloading submodules if that was the first time that submodule data was loaded.
* | | Fix segfault if gitmodules is invalidRussell Belfer2014-03-261-2/+3
| | | | | | | | | | | | | | | | | | The reload_all call could end up dereferencing a NULL pointer if there was an error while attempting to load the submodules config data (i.e. invalid content in the gitmodules file). This fixes it.
* | | Free temporary merge indexEdward Thomson2014-03-261-2/+1
| | |
* | | 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.