summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* userdiff: update ada patternsjk/userdiff-ccJeff King2014-04-081-2/+2
| | | | | | | | This is the moral equivalent of git/git@39a87a29ce364ed3337e535adce5973731ba2968 from Adrian Johnson <ajohnson@redneon.com>.
* userdiff: update C/C++ patternsJeff King2014-04-081-7/+5
| | | | | | | | | | | | This pulls upstream changes from: git/git@8a2e8da367f7175465118510b474ad365161d6b1 git/git@abf8f9860248d8c213600974742f18dadaa8fbb5 git/git@407e07f2a6f55e605fda9e90cb622887269f68b5 all by Johannes Sixt <j6t@kdbg.org>.
* graph: handle not finding a merge base gracefullyCarlos Martín Nieto2014-04-081-1/+6
| | | | | | | git_merge_base() returns GIT_ENOTFOUND when it cannot find a merge base. graph_desdendant_of() returns a boolean value (barring any errors), so it needs to catch the NOTFOUND return value and convert it into false, as not merge base means it cannot be a descendant.
* Merge pull request #2256 from jacquesg/graph-descendantVicent Marti2014-04-082-1/+9
|\ | | | | Correct grouping of parentheses
| * Added a no path test for git_graph_descendant_ofJacques Germishuys2014-04-081-0/+8
| |
| * Correct grouping of parenthesesJacques Germishuys2014-04-081-1/+1
| | | | | | | | git_graph_descendant_of was returning the result of an assignment
* | Merge pull request #2255 from libgit2/rb/fix-multiple-nfd-iconv-bugVicent Marti2014-04-072-1/+13
|\ \ | |/ |/| Fix bug with multiple iconv conversions in one dir
| * vmg is always rightRussell Belfer2014-04-071-1/+1
| |
| * Fix bug with multiple iconv conversions in one dirRussell Belfer2014-04-072-1/+13
|/ | | | | | | | The internal buffer in the `git_path_iconv_t` structure was not being reset before the calls to `iconv` were made to convert data, so if there were multiple decomposed Unicode paths in a single directory, paths after the first one were being appended to the first instead of treated as independent data.
* Merge pull request #2249 from libgit2/rb/starstar-fnmatchVicent Marti2014-04-073-9/+77
|\ | | | | Add support for ** matches in ignores
| * Fix fnmatch comment to be clearerrb/starstar-fnmatchRussell Belfer2014-04-061-1/+3
| |
| * More ** tests for pattern rulesRussell Belfer2014-04-062-6/+54
| |
| * Add support for ** matches in ignoresRussell Belfer2014-04-042-3/+21
| | | | | | | | | | This is an experimental addition to add ** support to fnmatch pattern matching in libgit2. It needs more testing.
* | 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
| | |/ / / | |/| | |