summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge pull request #2250 from jacquesg/vector-leakVicent Marti2014-04-061-2/+4
|\ \ | |/ |/| Don't lose our elements when calling git_vector_set()
| * Don't lose our elements when calling git_vector_set()Jacques Germishuys2014-04-061-2/+4
| |
* | Merge pull request #2215 from libgit2/rb/submodule-cache-fixesVicent Marti2014-04-0424-517/+1203
|\ \ | | | | | | Improve submodule cache management
| * | Test (and fix) the git_submodule_sync changesRussell Belfer2014-04-032-11/+38
| | | | | | | | | | | | | | | 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-032-108/+79
| | |
| * | git_submodule_resolve_url supports relative urlsJan Melcher2014-04-033-126/+198
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-014-14/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-012-10/+107
| | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | Minor submodule cache locking improvementsRussell Belfer2014-04-012-15/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | This improvement the management of the lock around submodule cache updates slightly, using the lock to make sure that foreach can safely make a snapshot of all existing submodules and making sure that git_submodule_add_setup also grabs a lock before inserting the new submodule. Cache initialization / refresh should already have been holding the lock correctly as it adds submodules.
| * | Reinstate efficient submodule reloadingRussell Belfer2014-04-011-123/+111
| | | | | | | | | | | | | | | This makes it so that git_submodule_reload_all will actually only reload changed items unless the `force` flag is used.
| * | Use enums instead of bools for submodule optionsRussell Belfer2014-04-011-20/+37
| | | | | | | | | | | | | | | | | | | | | When forcing cache flushes or reload, etc., it is easier to keep track of intent using enums instead of plain bools. Also, this fixes a bug where the cache was not being properly refreshes by a git_submodule_reload_all.
| * | Make submodule refresh a bit smarterRussell Belfer2014-04-015-64/+115
| | | | | | | | | | | | | | | | | | This makes submodule cache refresh actually look at the timestamps from the data sources for submodules and reload as needed if they have changed since the last refresh.
| * | Make a real submodule cache objectRussell Belfer2014-04-014-142/+243
| | | | | | | | | | | | | | | | | | | | | This takes the old submodule cache which was just a git_strmap and makes a real git_submodule_cache object that can contain other things like a lock and timestamp-ish data to control refreshing of submodule info.
| * | Add some funny options for debugging statusRussell Belfer2014-04-011-9/+50
| | | | | | | | | | | | | | | | | | | | | | | | This allows you to use a --repeat option to run status over and over and see how the output changes as you make local directory changes without reopening the git_repository object each time. Also, adds a flag to explicitly list the submodules before status.
| * | Submodule sync refactoringRussell Belfer2014-04-012-47/+49
| | | | | | | | | | | | | | | | | | Turns out there was already a helper to do what I wanted to do, so I just made it so that I could use it for sync and switched to that instead.
| * | Fix git_submodule_sync and add new config helperRussell Belfer2014-04-014-113/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes `git_submodule_sync` to correctly update the remote URL of the default branch of the submodule along with the URL in the parent repository config (i.e. match core Git's behavior). Also move some useful helper logic from the submodule code into a shared config API `git_config__update_entry` that can either set or delete an entry with constraints like not overwriting or not creating a new entry. I used that helper to update a couple other places in the code.
| * | Add efficient git_buf join3 APIRussell Belfer2014-04-015-5/+95
| | | | | | | | | | | | | | | | | | | | | 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 #2211 from Yogu/retry-renaming-configVicent Marti2014-04-041-1/+22
|\ \ \ | |_|/ |/| | Retry committing locked files on error
| * | Retry renaming files on Access Denied errorsJan Melcher2014-03-271-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a file is open for reading (without shared-delete permission), and then a different thread/process called p_rename, that would fail, even if the file was only open for reading for a few milliseconds. This change lets p_rename wait up to 50ms for the file to be closed by the reader. Applies only to win32. This is especially important for git_filebuf_commit, because writes should not fail if the file is read simultaneously. Fixes #2207
* | | Merge pull request #2244 from jacquesg/const-correctnessVicent Marti2014-04-0312-24/+31
|\ \ \ | | | | | | | | Const correctness!
| * | | Const correctness!Jacques Germishuys2014-04-0312-24/+31
|/ / /
* | | Merge pull request #2238 from libgit2/cmn/upstream-for-unbornVicent Marti2014-04-034-8/+90
|\ \ \ | | | | | | | | Handle an upstream branch for an unborn one
| * | | remote: mark branch for-merge even if we're unbornCarlos Martín Nieto2014-04-021-7/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the current branch is unborn, git will still mark the current branch's upstream for-merge if there is an upstream configuration. The only non-constrived case is cloning from an empty repository which then gains history. origin's master should be marked for-merge. In order to do this, we cannot use the high-level wrappers that expect a reference, as we may not have one. Move over to the internal ones that expect a reference name, which we do have.
| * | | 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 #2237 from mekishizufu/fix_return_valueVicent Marti2014-04-021-1/+1
|\ \ \ \ | | | | | | | | | | Fix submodule_is_config_only's return value
| * | | | checkout: Fix submodule_is_config_only's return valueJiri Pospisil2014-04-021-1/+1
| | | | |
* | | | | Merge pull request #2230 from anuraggup/revwalk-merge-baseVicent Marti2014-04-023-41/+93
|\ \ \ \ \ | |/ / / / |/| | | | No need to find merge base.
| * | | | No need to find merge base.Anurag Gupta2014-03-313-41/+93
| | | | |
* | | | | Merge pull request #2231 from libgit2/fix-memory-index-doc-commentVicent Marti2014-04-021-2/+2
|\ \ \ \ \ | | | | | | | | | | | | Correct a stale reference to GIT_EBAREINDEX
| * | | | | Give the correct name for the function in the doc.fix-memory-index-doc-commentRob Rix2014-04-021-2/+2
| | | | | | | | | | | | | | | | | | Per @carlosmn, git_index_add is now named git_index_add_bypath.
| * | | | | Correct a stale reference to GIT_EBAREINDEXRob Rix2014-04-011-1/+1
| | |/ / / | |/| | |
* | | | | Merge pull request #2233 from libgit2/rb/fix-untracked-repo-statusVicent Marti2014-04-023-25/+186
|\ \ \ \ \ | |/ / / / |/| | | | Skip untracked contained repo contents even with gitlink files
| * | | | New tests of status for repo inside reporb/fix-untracked-repo-statusRussell Belfer2014-04-012-24/+183
| | | | |
| * | | | Fix skipping content of contained reposRussell Belfer2014-04-011-1/+3
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | When doing a diff for use in status, we should never show the content of a git repository contained inside another one. The logic to do this was looking for a .git directory and so when a gitlink plain .git file was used, it was failing to exclude the directory content.
* | | | refspec: git_refspec_parse() does not existCarlos Martín Nieto2014-04-011-1/+0
| |_|/ |/| |
* | | Merge pull request #2208 from libgit2/vmg/mempackRussell Belfer2014-04-013-0/+278
|\ \ \ | | | | | | | | In-memory packing backend
| * | | In-memory packing backendvmg/mempackVicent Marti2014-03-263-0/+278
| | | |
* | | | Merge pull request #2226 from libgit2/rb/submodule-sorting-fixEdward Thomson2014-04-015-19/+52
|\ \ \ \ | | | | | | | | | | Fix submodule sort order during iteration
| * | | | Improve test of submodule name sortingRussell Belfer2014-03-311-0/+6
| | | | |
| * | | | CleanupsRussell Belfer2014-03-313-4/+4
| | | | |
| * | | | Fix submodule sorting in workdir iteratorRussell Belfer2014-03-311-16/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the changes to how git_path_dirload_with_stat handles things that look like submodules, submodules could end up sorted in the wrong order with the workdir iterator. This moves the submodule check earlier in the iterator processing of a new directory so that the submodule name updates will happen immediately and the sort order will be correct.
| * | | | Add faster git_submodule__is_submodule checkRussell Belfer2014-03-312-0/+18
| | |/ / | |/| |
* | | | Merge pull request #2229 from linquize/Wdeclaration-after-statementVicent Marti2014-04-011-1/+1
|\ \ \ \ | | | | | | | | | | Add CFLAGS -Wdeclaration-after-statement
| * | | | Add CFLAGS -Wdeclaration-after-statementLinquize2014-04-011-1/+1
|/ / / / | | | | | | | | | | | | This warns local variables declarations after statement, which helps not to break MSVC