Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-12-21typos in commentsDmitriy Olshevskiy
2015-11-05submodule: test updating a submodule w/ a pathEdward Thomson
Test that `git_submodule_update` can handle a submodule that is freshly cloned and has a path differing from its name.
2015-09-21Merge pull request #3434 from ethomson/reservednamesCarlos Martín Nieto
Win32 Reserved names: don't reserve names outside the working directory
2015-09-18repo::reservedname: test a submodule updateEdward Thomson
Test an initial submodule update, where we are trying to checkout the submodule for the first time, and placing a file within the submodule working directory with the same name as the submodule (and consequently, the same name as the repository itself).
2015-09-18Fix a couple of warningsCarlos Martín Nieto
2015-09-17git_futils_mkdir_*: make a relative-to-base mkdirEdward Thomson
Untangle git_futils_mkdir from git_futils_mkdir_ext - the latter assumes that we own everything beneath the base, as if it were being called with a base of the repository or working directory, and is tailored towards checkout and ensuring that there is no bogosity beneath the base that must be cleaned up. This is (at best) slow and (at worst) unsafe in the larger context of a filesystem where we do not own things and cannot do things like unlink symlinks that are in our way.
2015-09-10submodule: add a test for a renamed submdoule dirCarlos Martín Nieto
2015-08-29iterator: use an options struct instead of argsEdward Thomson
2015-07-24Merge pull request #3307 from libgit2/cmn/submodule-backslashEdward Thomson
Normalize submodule urls before looking at them
2015-07-24Merge pull request #3303 from libgit2/cmn/index-add-submoduleEdward Thomson
Allow adding a submodule through git_index_add_bypath
2015-07-13submodule: add failing test for backslash in urlCarlos Martín Nieto
2015-07-12blob: fail to create a blob from a dir with EDIRECTORYCarlos Martín Nieto
This also affects `git_index_add_bypath()` by providing a better error message and a specific error code when a directory is passed.
2015-07-11submdule: reproduce double-reporting of a submodule in foreachCarlos Martín Nieto
When we rename a submodule, we should be merging two sets of information based on whether their path is the same. We currently only deduplicate on equal name, which causes us to double-report.
2015-07-01submodule: add failing test for loading the wrong submoduleCarlos Martín Nieto
When two submodules are fairly similar, we may end up loading the wrong one.
2015-07-01submodule: completely remove reload_allCarlos Martín Nieto
The function was removed, but its declaration and changelog entry about its removal were forgotten. The comment in the test doesn't make any sense as the function doesn't exist anymore, so get rid of it as well.
2015-06-29submodule: remove trailing slashes from submodule pathsCarlos Martín Nieto
We allow looking up a submodule by path, but we lost the path normalisation during the recent changes. Bring it back.
2015-06-25Rename FALLBACK to UNSPECIFIEDCarlos Martín Nieto
Fallback describes the mechanism, while unspecified explains what the user is thinking.
2015-06-22submodule: test unsetting config optionsCarlos Martín Nieto
In addition to mapping enums to strings in the configuration, we need to know to delete the configuration option when given the "none" or "no" option.
2015-06-22submodule: test more accurately for non-existenceCarlos Martín Nieto
The current code will always fail, but only because it's asking for a string on a live config. Take a snapshot and make sure we fail with ENOTFOUND instead of any old error.
2015-06-22submodule: fix potential leak in the testsCarlos Martín Nieto
2015-06-22submodule: get rid of `_save()`Carlos Martín Nieto
We no longer have any setters which affect an instance, so `git_submodule_save()` is no longer relevant.
2015-06-22submodule: make `_set_url()` affect the configurationCarlos Martín Nieto
With this one, we can get rid of the edit_and_save test.
2015-06-22submodule: make `_set_branch()` affect the configurationCarlos Martín Nieto
2015-06-22submodule: make `_set_update_fetch_recurse_submodules()` affect the configCarlos Martín Nieto
Similarly to the other ones. In this test we copy over testing `RECURSE_YES` which shows an error in our handling of the `YES` variant which we may have to port to the rest.
2015-06-22submodule: make `_set_update()` affect the configurationCarlos Martín Nieto
Moving on with the removal of runtime-changing variables, the update setting for a remote is whatever it was when it was looked up.
2015-06-22submodule: add an ignore option to statusCarlos Martín Nieto
This lets us specify in the status call which ignore rules we want to use (optionally falling back to whatever the submodule has in its configuration). This removes one of the reasons for having `_set_ignore()` set the value in-memory. We re-use the `IGNORE_RESET` value for this as it is no longer relevant but has a similar purpose to `IGNORE_FALLBACK`. Similarly, we remove `IGNORE_DEFAULT` which does not have use outside of initializers and move that to fall back to the configuration as well.
2015-06-22submodule: don't let status change an existing instanceCarlos Martín Nieto
As submodules are becomes more like values, we should not let a status check to update its properties. Instead of taking a submodule, have status take a repo and submodule name.
2015-06-22submodule: make set_ignore() affect the configurationCarlos Martín Nieto
Instead of affecting a particular instance, make it change the configuration.
2015-06-22submodule: remove the per-repo cacheCarlos Martín Nieto
Having this cache and giving them out goes against our multithreading guarantees and it makes it impossible to use submodules in a multi-threaded environment, as any thread can ask for a refresh which may reallocate some string in the submodule struct which we've accessed in a different one via a getter. This makes the submodules behave more like remotes, where each object is created upon request and not shared except explicitly by the user. This means that some tests won't pass yet, as they assume they can affect the submodule objects in the cache and that will affect later operations.
2015-05-13Fix a few leaksCarlos Martín Nieto
The interesting one is the notification macro, which was returning directly on a soft-abort instead of going through the cleanup.
2015-05-13Remove the callbacks struct from the remoteCarlos Martín Nieto
Having the setting be different from calling its actions was not a great idea and made for the sake of the wrong convenience. Instead of that, accept either fetch options, push options or the callbacks when dealing with the remote. The fetch options are currently only the callbacks, but more options will be moved from setters and getters on the remote to the options. This does mean passing the same struct along the different functions but the typical use-case will only call git_remote_fetch() or git_remote_push() and so won't notice much difference.
2015-04-12Implement git_submodule_set_branch.Patrick Steinhardt
2015-03-12Fix git_submodule_sync writing URL to wrong key.Patrick Steinhardt
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).
2015-03-03config: borrow refcounted referencesCarlos Martín Nieto
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.
2015-03-03repository: remove log message override for switching the active branchCarlos Martín Nieto
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.
2015-03-03Remove the signature from ref-modifying functionsCarlos Martín Nieto
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.
2015-01-09Fix warningCarlos Martín Nieto
2015-01-09submodule::init tests: free some leaksEdward Thomson
2014-12-23Introduce a convenience function for submodule updateJameson Miller
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.
2014-12-23submodule init should resolve relative url pathsJameson Miller
Submodule init should handle relative paths in .gitmodules files and resolve these urls when updating the git config file.
2014-11-08remote: rename _load() to _lookup()Carlos Martín Nieto
This brings it in line with the rest of the lookup functions.
2014-11-07iterator: submodules are determined by an index or treeCarlos Martín Nieto
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.
2014-10-27submodule test: free submoduleEdward Thomson
2014-10-24remote: accept a repo and name for renamingCarlos Martín Nieto
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.
2014-09-03Introduce option to use relative paths for repository work directoryJameson Miller
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.
2014-06-08Merge pull request #2407 from libgit2/cmn/remote-rename-morev0.21.0-rc1Vicent Marti
More remote rename fixes
2014-06-07Win32: Fix diff::workdir::submodules test #2361Philip Kelley
2014-06-06remote: return problem refspecs instead of using a callbackCarlos Martín Nieto
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.
2014-04-03Test (and fix) the git_submodule_sync changesRussell Belfer
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.
2014-04-03Minor code cleanupRussell Belfer