summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Update submodules with parent-tracked contentrb/fix-submodules-with-tracked-contentRussell Belfer2014-04-081-3/+90
| | | | | | | | | | | | | | This updates how libgit2 treats submodule-like directories that actually have tracked content inside of them. This is a strange corner case, but it seems that many people have abortive submodule setups and then just went ahead and added the files into the parent repository. In this case, we should just treat the submodule as if it was a normal directory. Libgit2 will still try to skip over real submodules and contained repositories that do not have tracked files inside them, but this adds some new handling for cases where the apparently submodule data is in conflict with the actual list of tracked files.
* Merge pull request #2256 from jacquesg/graph-descendantVicent Marti2014-04-081-0/+8
|\ | | | | Correct grouping of parentheses
| * Added a no path test for git_graph_descendant_ofJacques Germishuys2014-04-081-0/+8
| |
* | Fix bug with multiple iconv conversions in one dirRussell Belfer2014-04-071-1/+11
|/ | | | | | | | The internal buffer in the `git_path_iconv_t` structure was not being reset before the calls to `iconv` were made to convert data, so if there were multiple decomposed Unicode paths in a single directory, paths after the first one were being appended to the first instead of treated as independent data.
* More ** tests for pattern rulesRussell Belfer2014-04-062-6/+54
|
* Add support for ** matches in ignoresRussell Belfer2014-04-041-0/+13
| | | | | This is an experimental addition to add ** support to fnmatch pattern matching in libgit2. It needs more testing.
* Merge pull request #2215 from libgit2/rb/submodule-cache-fixesVicent Marti2014-04-048-98/+420
|\ | | | | Improve submodule cache management
| * Test (and fix) the git_submodule_sync changesRussell Belfer2014-04-031-8/+26
| | | | | | | | | | I wrote this stuff a while ago and forgot to write tests. Wanted to do so now to wrap up the PR and immediately found problems.
| * Minor code cleanupRussell Belfer2014-04-031-30/+32
| |
| * git_submodule_resolve_url supports relative urlsJan Melcher2014-04-032-73/+115
| | | | | | | | | | | | | | | | | | | | | | The base for the relative urls is determined as follows, with descending priority: - remote url of HEAD's remote tracking branch - remote "origin" - workdir This follows git.git behaviour
| * Test git_submodule_add_setup with relative urlJan Melcher2014-04-031-0/+24
| |
| * More tests and fix submodule index refreshRussell Belfer2014-04-013-13/+129
| | | | | | | | | | | | | | | | | | | | There was a little bug where the submodule cache thought that the index date was out of date even when it wasn't that was resulting in some extra scans of index data even when not needed. Mostly this commit adds a bunch of new tests including adding and removing submodules in the index and in the HEAD and seeing if we can automatically pick them up when refreshing.
| * Remove most submodule reloads from testsRussell Belfer2014-04-013-34/+55
| | | | | | | | | | | | | | | | | | | | | | With the new submodule cache validity checks, we generally don't need to call git_submodule_reload_all to have up-to-date submodule data. Some tests are still calling it where I want to actually test that it can be called safely and doesn't break anything, but mostly it is not needed. This also expands some of the existing submodule tests to cover some variants on the behavior that was already being tested.
| * Fix submodule accounting for name and path changesRussell Belfer2014-04-011-0/+67
| | | | | | | | | | | | | | | | Wrote tests that try adding, removing, and updating the name of submodules which showed a number of problems with how we account for changes when incrementally updating the submodule info. Most of these issues didn't exist before because reloading would always blow away the old submodule data.
| * Add efficient git_buf join3 APIRussell Belfer2014-04-011-0/+32
| | | | | | | | | | | | | | There are a few places where we need to join three strings to assemble a path. This adds a simple join3 function to avoid the comparatively expensive join_n (which calls strlen on each string twice).
* | Merge pull request #2238 from libgit2/cmn/upstream-for-unbornVicent Marti2014-04-033-1/+70
|\ \ | | | | | | Handle an upstream branch for an unborn one
| * | remote: write tests for cloning from an empty repoCarlos Martín Nieto2014-04-023-1/+70
| | | | | | | | | | | | | | | | | | | | | | | | Cloning from an empty repo must set master's upstream to origin's master, even if neither of them exist. Fetching from a non-empty origin must then mark the master branch for-merge. This currently fails.
* | | Merge pull request #2239 from libgit2/vmg/clar-skip-testVicent Marti2014-04-036-69/+89
|\ \ \ | |/ / |/| | Skip tests on Clar
| * | Clar: skip testsvmg/clar-skip-testVicent Marti2014-04-026-73/+89
| | |
| * | Add warning when skipping blame testRussell Belfer2014-04-021-12/+7
| | |
| * | Skip blame libgit2 test if not in libgit2 repoRussell Belfer2014-04-011-2/+11
| |/ | | | | | | | | | | | | | | One blame test replies on being run from within the libgit2 repository to leverage having a longer history to play with, but some bundled versions of libgit2 don't have the whole libgit2 history. This just skips that test if the repository can't be opened.
* | Merge pull request #2230 from anuraggup/revwalk-merge-baseVicent Marti2014-04-021-4/+75
|\ \ | | | | | | No need to find merge base.
| * | No need to find merge base.Anurag Gupta2014-03-311-4/+75
| | |
* | | New tests of status for repo inside reporb/fix-untracked-repo-statusRussell Belfer2014-04-012-24/+183
| |/ |/|
* | Merge pull request #2226 from libgit2/rb/submodule-sorting-fixEdward Thomson2014-04-011-0/+6
|\ \ | | | | | | Fix submodule sort order during iteration
| * | Improve test of submodule name sortingRussell Belfer2014-03-311-0/+6
| |/
* | Merge pull request #2206 from libgit2/cmn/inmemory-swap-orderVicent Marti2014-04-013-9/+9
|\ \ | | | | | | 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-013-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-313-10/+19
|\ \ \ | |_|/ |/| | Fix git_odb_short_id and git_odb_exists_prefix bugs
| * | Add failing test for git_object_short_idJiri Pospisil2014-03-102-0/+7
| | |
| * | Fix a number of git_odb_exists_prefix bugsRussell Belfer2014-03-101-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Introduce git_merge_head_idEdward Thomson2014-03-311-0/+27
| | |
* | | Update clar to 4b75388Edward Thomson2014-03-281-2/+8
| | |
* | | Sandbox configuration during test runsEdward Thomson2014-03-281-1/+10
| | |
* | | Update clar to 587f88aEdward Thomson2014-03-283-3/+35
| | |
* | | Fix memory leak of test repository objectRussell Belfer2014-03-271-2/+5
| | |
* | | Fix error when submodule path and name differRussell Belfer2014-03-261-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | 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-0/+95
| | | | | | | | | | | | | | | | | | 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.
* | | Decorate unused params as unused in revwalk::hidecb testsEdward Thomson2014-03-261-0/+9
| | |
* | | Merge pull request #2204 from libgit2/rb/submodule-reference-countingVicent Marti2014-03-268-244/+197
|\ \ \ | |_|/ |/| | Make submodules externally refcounted
| * | Make submodules externally refcountedRussell Belfer2014-03-258-244/+197
| | | | | | | | | | | | | | | | | | | | | | | | `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-264-12/+78
|\ \ \ | | | | | | | | Update behavior for untracked contained repositories
| * | | Update behavior for untracked sub-reposRussell Belfer2014-03-254-12/+78
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Test for giterr_captureEdward Thomson2014-03-251-0/+24
| | |
* | | Merge pull request #2181 from anuraggup/hide_cbEdward Thomson2014-03-251-0/+198
|\ \ \ | |/ / |/| | Callback function to hide commit and its parents in revision walker
| * | Modified test for revwalk_hidecbAnurag Gupta2014-03-241-2/+2
| | |
| * | Conforming to libgit2 coding style.Anurag Gupta2014-03-241-3/+2
| | |
| * | Unit Tests for hide_cb in revwalkAnurag Gupta2014-03-241-0/+199
| | |
* | | env test needs to deref git_buf's ptrEdward Thomson2014-03-241-1/+1
| | |
* | | Merge pull request #2183 from ethomson/merge_refactorVicent Marti2014-03-2419-474/+465
|\ \ \ | |/ / |/| | Refactor the `git_merge` API