tests/submodule


Log

Author Commit Date CI Message
Carlos Martín Nieto 659cf202 2015-01-07T12:23:05 Remove the signature from ref-modifying functions The signature for the reflog is not something which changes dynamically. Almost all uses will be NULL, since we want for the repository's default identity to be used, making it noise. In order to allow for changing the identity, we instead provide git_repository_set_ident() and git_repository_ident() which allow a user to override the choice of signature.
Carlos Martín Nieto 4e498646 2015-01-15T16:50:31 repository: remove log message override for switching the active branch We want to use the "checkout: moving from ..." message in order to let git know when a change of branch has happened. Make the convenience functions for this goal write this message.
Carlos Martín Nieto fe8399fe 2015-01-09T16:29:08 Fix warning
Edward Thomson 365d3672 2015-01-08T21:32:44 submodule::init tests: free some leaks
Jameson Miller 9d1f97df 2014-10-29T17:49:04 Introduce a convenience function for submodule update This introduces the functionality of submodule update in 'git_submodule_do_update'. The existing 'git_submodule_update' function is renamed to 'git_submodule_update_strategy'. The 'git_submodule_update' function now refers to functionality similar to `git submodule update`, while `git_submodule_update_strategy` is used to get the configured value of submodule.<name>.update.
Jameson Miller b2ab887e 2014-10-20T18:07:32 submodule init should resolve relative url paths Submodule init should handle relative paths in .gitmodules files and resolve these urls when updating the git config file.
Carlos Martín Nieto 209425ce 2014-11-08T13:25:51 remote: rename _load() to _lookup() This brings it in line with the rest of the lookup functions.
Carlos Martín Nieto 62a617dc 2014-11-06T16:16:46 iterator: submodules are determined by an index or tree We cannot know from looking at .gitmodules whether a directory is a submodule or not. We need the index or tree we are comparing against to tell us. Otherwise we have to assume the entry in .gitmodules is stale or otherwise invalid. Thus we pass the index of the repository into the workdir iterator, even if we do not want to compare against it. This follows what git does, which even for `git diff <tree>`, it will consider staged submodules as such.
Edward Thomson e4985fe3 2014-10-25T19:52:52 submodule test: free submodule
Carlos Martín Nieto 46c8f7f8 2014-10-24T16:25:59 remote: accept a repo and name for renaming Remote objects are not meant to be changed from under the user. We did this in rename, but only the name and left the refspecs, such that a save would save the wrong refspecs (and a fetch and anything else would use the wrong refspecs). Instead, let's simply take a name and not change any loaded remote from under the user.
Jameson Miller bc737620 2014-08-20T10:24:41 Introduce option to use relative paths for repository work directory Teach git_repository_init_ext to use relative paths for the gitlink to the work directory. This is used when creating a sub repository where the sub repository resides in the parent repository's .git directory.
Vicent Marti ce5e6617 2014-06-08T16:44:32 Merge pull request #2407 from libgit2/cmn/remote-rename-more More remote rename fixes
Philip Kelley daf2a648 2014-06-07T12:18:56 Win32: Fix diff::workdir::submodules test #2361
Carlos Martín Nieto 72bca13e 2014-06-06T16:33:54 remote: return problem refspecs instead of using a callback There is no reason why we need to use a callback here. A string array fits better with the usage, as this is not an event and we don't need anything from the user.
Russell Belfer eedeeb9e 2014-04-03T11:58:51 Test (and fix) the git_submodule_sync changes 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.
Russell Belfer 18cc7d28 2014-04-03T11:29:08 Minor code cleanup
Jan Melcher f2fb4bac 2014-04-02T23:55:21 git_submodule_resolve_url supports relative urls 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
Jan Melcher 12d4ed4d 2014-03-08T23:04:56 Test git_submodule_add_setup with relative url
Russell Belfer 8f4e5275 2014-04-01T16:46:25 More tests and fix submodule index refresh 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.
Russell Belfer 8061d519 2014-04-01T13:24:06 Remove most submodule reloads from tests 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.
Russell Belfer 4ece3e22 2014-04-01T12:19:11 Fix submodule accounting for name and path changes 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.
Russell Belfer 380f864a 2014-03-26T16:06:21 Fix error when submodule path and name differ 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.
Russell Belfer 22df47cb 2014-03-26T14:38:26 Fix segfault if gitmodules is invalid 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.
Vicent Marti dc7efa1a 2014-03-26T18:29:34 Merge pull request #2204 from libgit2/rb/submodule-reference-counting Make submodules externally refcounted
Russell Belfer d3bc95fd 2014-03-25T12:37:05 Update behavior for untracked sub-repos 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.
Russell Belfer a15c7802 2014-03-25T09:14:48 Make submodules externally refcounted `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.
Russell Belfer c0644c3f 2014-01-28T11:45:06 Make submodule fetchRecurse match other options 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).
Carlos Martín Nieto 0b28217b 2014-01-15T12:51:31 refs: remove the _with_log differentiation 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.
Linquize 41ceab25 2013-12-29T11:21:13 Update test related to fetchRecurseSubmodules
Ben Straub 17820381 2013-11-14T14:05:52 Rename tests-clar to tests