summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* | vmg is always rightRussell Belfer2014-04-071-1/+1
| |
* | Fix bug with multiple iconv conversions in one dirRussell Belfer2014-04-071-0/+2
|/ | | | | | | | 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-071-3/+10
|\ | | | | Add support for ** matches in ignores
| * Fix fnmatch comment to be clearerrb/starstar-fnmatchRussell Belfer2014-04-061-1/+3
| |
| * Add support for ** matches in ignoresRussell Belfer2014-04-041-3/+8
| | | | | | | | | | 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-0415-410/+733
|\ \ | | | | | | Improve submodule cache management
| * | Test (and fix) the git_submodule_sync changesRussell Belfer2014-04-031-3/+12
| | | | | | | | | | | | | | | 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-031-78/+47
| | |
| * | git_submodule_resolve_url supports relative urlsJan Melcher2014-04-031-53/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | More tests and fix submodule index refreshRussell Belfer2014-04-011-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | Fix submodule accounting for name and path changesRussell Belfer2014-04-011-10/+40
| | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | 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-014-5/+63
| | | | | | | | | | | | | | | | | | | | | 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
* | | Const correctness!Jacques Germishuys2014-04-036-12/+16
| | |
* | | 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.
* | | 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-022-37/+18
|\ \ \ \ | |/ / / |/| | | No need to find merge base.
| * | | No need to find merge base.Anurag Gupta2014-03-312-37/+18
| | | |
* | | | 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-011-0/+182
|\ \ \ | | | | | | | | In-memory packing backend
| * | | In-memory packing backendvmg/mempackVicent Marti2014-03-261-0/+182
| | | |
* | | | Merge pull request #2226 from libgit2/rb/submodule-sorting-fixEdward Thomson2014-04-014-19/+46
|\ \ \ \ | | | | | | | | | | Fix submodule sort order during iteration
| * | | | 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 #2206 from libgit2/cmn/inmemory-swap-orderVicent Marti2014-04-011-4/+4
|\ \ \ \ | | | | | | | | | | Rename in-memory remote to anonymous and swap url and fetch order
| * | | | remote: rename inmemory to anonymous and swap url and fetch orderCarlos Martín Nieto2014-04-011-4/+4
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The order in this function is the opposite to what create_with_fetchspec() has, so change this one, as url-then-refspec is what git does. As we need to break compilation and the swap doesn't do that, let's take this opportunity to rename in-memory remotes to anonymous as that's really what sets them apart.
* | | | Merge pull request #2178 from libgit2/rb/fix-short-idEdward Thomson2014-03-311-7/+17
|\ \ \ \ | |_|/ / |/| | | Fix git_odb_short_id and git_odb_exists_prefix bugs
| * | | Fix a number of git_odb_exists_prefix bugsRussell Belfer2014-03-101-7/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The git_odb_exists_prefix API was not dealing correctly when a later backend returned GIT_ENOTFOUND even if an earlier backend had found the object. Additionally, the unit tests were not properly exercising the API and had a couple mistakes in checking the results. Lastly, since the backends are not expected to behavior correctly unless all bytes of the short id are zero except for the prefix, this makes the ODB prefix APIs explicitly clear out the extra bytes so the user doesn't have to be as careful.
* | | | Const up members of git_merge_file_resultEdward Thomson2014-03-311-2/+2
| | | |
* | | | Merge pull request #2222 from ethomson/merge_head_idVicent Marti2014-03-311-0/+8
|\ \ \ \ | | | | | | | | | | Introduce git_merge_head_id
| * | | | Introduce git_merge_head_idEdward Thomson2014-03-311-0/+8
| | | | |
* | | | | Don't reset need_packEtienne Samson2014-03-301-1/+2
|/ / / / | | | | | | | | While looping over multiple heads, an up-to-date head will clobber the `remote->need_pack` setting, preventing the rest of the machinery from building and downloading a pack-file, breaking fetches.
* | | | Fix memory leak of submodule branch nameRussell Belfer2014-03-271-0/+1
| | | |
* | | | Fix use-after-free in submodule reloadRussell Belfer2014-03-271-3/+6
| |_|/ |/| | | | | | | | | | | | | | If the first call to release a no-longer-existent submodule freed the object, the check if a second is needed would dereference the data that was just freed.
* | | Fix error when submodule path and name differRussell Belfer2014-03-261-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Fix segfault if gitmodules is invalidRussell Belfer2014-03-261-2/+3
| | | | | | | | | | | | | | | | | | 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.
* | | Free temporary merge indexEdward Thomson2014-03-261-2/+1
| | |