summaryrefslogtreecommitdiff
path: root/tests/submodule/modify.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix a few leaksCarlos Martín Nieto2015-05-131-0/+1
| | | | | The interesting one is the notification macro, which was returning directly on a soft-abort instead of going through the cleanup.
* Implement git_submodule_set_branch.Patrick Steinhardt2015-04-121-3/+25
|
* Fix git_submodule_sync writing URL to wrong key.Patrick Steinhardt2015-03-121-3/+3
| | | | | | | | Currently git_submodule_sync writes the submodule's URL to the key 'branch.<REMOTE_NAME>.remote' while the reference implementation of `git submodule sync` writes to 'remote.<REMOTE_NAME>.url', which is the intended behavior according to git-submodule(1).
* config: borrow refcounted referencescmn/config-borrow-entryCarlos Martín Nieto2015-03-031-12/+5
| | | | | | | | | | | | | | | This changes the get_entry() method to return a refcounted version of the config entry, which you have to free when you're done. This allows us to avoid freeing the memory in which the entry is stored on a refresh, which may happen at any time for a live config. For this reason, get_string() has been forbidden on live configs and a new function get_string_buf() has been added, which stores the string in a git_buf which the user then owns. The functions which parse the string value takea advantage of the borrowing to parse safely and then release the entry.
* Introduce a convenience function for submodule updatejamill/submodule_updateJameson Miller2014-12-221-5/+5
| | | | | | | | | 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.
* 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.
* git_submodule_resolve_url supports relative urlsJan Melcher2014-04-031-73/+0
| | | | | | | | | | | 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
|
* Make submodules externally refcountedRussell Belfer2014-03-251-7/+15
| | | | | | | | `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.
* 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).
* Update test related to fetchRecurseSubmodulesLinquize2013-12-311-8/+17
|
* Rename tests-clar to testsBen Straub2013-11-141-0/+253