summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | Fix core.excludesfile named .gitignorerb/fix-leading-slash-ignoresRussell Belfer2014-04-144-12/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ignore rules with slashes in them are matched using FNM_PATHNAME and use the path to the .gitignore file from the root of the repository along with the path fragment (including slashes) in the ignore file itself. Unfortunately, the relative path to the .gitignore file was being applied to the global core.excludesfile if that was also named ".gitignore". This fixes that with more precise matching and includes test for ignore rules with leading slashes (which were the primary example of this being broken in the real world). This also backports an improvement to the file context logic from the threadsafe-iterators branch where we don't rely on mutating the key of the attribute file name to generate the context path.
* | | | Merge pull request #2235 from jacquesg/cherry-pickVicent Marti2014-04-1594-2/+653
|\ \ \ \ | |/ / / |/| | | Add cherry pick support
| * | | Capture conflict information in MERGE_MSG for revert and mergeJacques Germishuys2014-04-142-2/+22
| | | |
| * | | Added cherry pick testsJacques Germishuys2014-04-1492-0/+631
| | | |
* | | | Merge pull request #2264 from jacquesg/fix-warningsVicent Marti2014-04-141-2/+3
|\ \ \ \ | | | | | | | | | | Correct C90 warnings
| * | | | Correct C90 warningsJacques Germishuys2014-04-111-2/+3
| | |/ / | |/| |
* | | | Merge pull request #2262 from libgit2/rb/fix-ignore-popVicent Marti2014-04-141-30/+81
|\ \ \ \ | |/ / / |/| | | Fix bug popping ignore files during wd iteration
| * | | Fix bug popping ignore files during wd iterationRussell Belfer2014-04-101-30/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were a couple bugs in popping ignore files during iteration that could result in incorrect decisions be made and thus ignore files below the root either not being loaded correctly or not being popped at the right time. One bug was an off-by-one in comparing the path of the gitignore file with the path being exited during iteration. The second bug was not correctly truncating the path being tracked during traversal if there were no ignores on the list (i.e. when you have no .gitignore at the root, but do have some in contained directories).
* | | | Merge pull request #2259 from libgit2/vmg/state-cleanupVicent Marti2014-04-091-0/+18
|\ \ \ \ | | | | | | | | | | Rewrite `state-cleanup`
| * | | | git_repository_state_cleanup() should remove rebase-merge/, rebase-apply/ ↵Jacques Germishuys2014-04-071-0/+18
| | |/ / | |/| | | | | | | | | | and BISECT_LOG
* | | | 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