summaryrefslogtreecommitdiff
path: root/tests/submodule
Commit message (Collapse)AuthorAgeFilesLines
* 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-012-29/+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.
* 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.
* Merge pull request #2204 from libgit2/rb/submodule-reference-countingVicent Marti2014-03-265-241/+185
|\ | | | | Make submodules externally refcounted
| * Make submodules externally refcountedRussell Belfer2014-03-255-241/+185
| | | | | | | | | | | | | | | | `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.
* | Update behavior for untracked sub-reposRussell Belfer2014-03-251-6/+10
|/ | | | | | | | | | | 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.
* Make submodule fetchRecurse match other optionsRussell Belfer2014-01-301-14/+20
| | | | | | This removes the fetchRecurse compiler warnings and makes the behavior match the other submodule options (i.e. the in-memory setting can be reset to the on-disk value).
* refs: remove the _with_log differentiationCarlos Martín Nieto2014-01-151-1/+1
| | | | | | Any well-behaved program should write a descriptive message to the reflog whenever it updates a reference. Let's make this more prominent by removing the version without the reflog parameters.
* Update test related to fetchRecurseSubmodulesLinquize2013-12-311-8/+17
|
* Rename tests-clar to testsBen Straub2013-11-145-0/+982