summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Never consider submodules for stashingJustin Spahr-Summers2013-09-271-2/+6
|
* Why are we disabling redirects?Ben Straub2013-09-251-0/+3
|
* Win32: handle http->https redirectsBen Straub2013-09-251-124/+192
|
* Merge pull request #1871 from libgit2/cross-protocol-redirects-altVicent Martí2013-09-242-62/+108
|\ | | | | Alternative fix for cross protocol redirects
| * Prevent HTTPS to HTTP redirectRussell Belfer2013-09-241-1/+6
| |
| * Disconnect path string to preserve after redirectRussell Belfer2013-09-242-79/+104
| | | | | | | | | | | | | | | | | | | | | | | | The subtransport path was relying on pointing to data owned by the remote which meant that after a redirect, the updated path was getting lost for future requests. This updates the http transport to strdup the path and maintain its own lifetime. This also pulls responsibility for parsing the URL back into the http transport and isolates the functions that parse and free that connection data so that they can be reused between the initial parsing and the redirect parsing.
| * Properly parse urls that include protocol://Ben Straub2013-09-241-1/+4
| |
| * Allow redirects to use same hostBen Straub2013-09-241-2/+15
| |
* | Ignore files that disappear while iteratingEdward Thomson2013-09-241-1/+9
|/ | | | | | On occasion, files can disappear while we're iterating the filesystem, between calls to readdir and stat. Let's pretend those didn't exist in the first place.
* Merge pull request #1865 from arrbee/various-cleanupsVicent Martí2013-09-246-14/+27
|\ | | | | Various warning cleanup and minor fixes
| * Fix incorrect return code in crlf filterRussell Belfer2013-09-241-2/+2
| | | | | | | | | | | | The git_buf_text_gather_stats call returns a boolean indicating if the file looks like binary data. That shouldn't be an error; it should be used to skip CRLF processing though.
| * Clean up unnecessary git_buf_printf callsRussell Belfer2013-09-232-4/+7
| | | | | | | | | | | | This replaces some git_buf_printf calls with simple calls to git_buf_put instead. Also, it fixes a missing va_end inside the git_buf_vprintf implementation.
| * Fix warnings on Windows 64-bit buildRussell Belfer2013-09-231-3/+11
| |
| * Clean up newly introduced warningsRussell Belfer2013-09-232-5/+7
| | | | | | | | | | | | | | | | | | | | The attempt to "clean up warnings" seems to have introduced some new warnings on compliant compilers. This fixes those in a way that I suspect will also be okay for the non-compliant compilers. Also this fixes what appears to be an extra semicolon in the repo initialization template dir handling (and as part of that fix, handles the case where an error occurs correctly).
* | Merge pull request #1864 from libgit2/minimize-regex-usageVicent Martí2013-09-242-58/+29
|\ \ | | | | | | Minimize regex usage
| * | Remove regex usage from places that don't need itRussell Belfer2013-09-232-58/+29
| |/ | | | | | | | | | | | | | | | | | | | | In revwalk, we are doing a very simple check to see if a string contains wildcard characters, so a full regular expression match is not needed. In remote listing, now that we have git_config_foreach_match with full regular expression matching, we can take advantage of that and eliminate the regex here, replacing it with much simpler string manipulation.
* | 'del' instead of 'delete' for the poor C++ usersEdward Thomson2013-09-242-2/+2
|/
* Merge pull request #1863 from linquize/typoVicent Martí2013-09-221-1/+1
|\ | | | | Fix typo in documentation
| * Fix typo in documentationLinquize2013-09-221-1/+1
| |
* | merge: reverse array and length parameter orderCarlos Martín Nieto2013-09-221-1/+1
|/ | | | Make it pair up with the one for commits. This fixes #1691.
* Merge pull request #1840 from linquize/warningVicent Martí2013-09-219-17/+17
|\ | | | | Fix warning
| * Fix warningLinquize2013-09-199-17/+17
| |
* | Merge pull request #1859 from linquize/init.templatedirVicent Martí2013-09-201-18/+13
|\ \ | | | | | | Make init.templatedir work
| * | Check error value from git_futils_find_template_dirLinquize2013-09-201-2/+2
| | |
| * | Make init.templatedir workLinquize2013-09-191-17/+12
| | |
* | | msvc: No void* arithmetic on WindowsVicent Marti2013-09-181-1/+1
| | |
* | | Merge pull request #1860 from libgit2/cmn/indexer-hashVicent Martí2013-09-171-19/+71
|\ \ \ | |/ / |/| | indexer: check the packfile trailer
| * | indexer: don't reiterate the class in the messageCarlos Martín Nieto2013-09-181-3/+3
| | |
| * | indexer: check the packfile trailer for correctnessCarlos Martín Nieto2013-09-181-17/+69
| | | | | | | | | | | | | | | The packfile trailer gets sent over and we should check whether it's correct as part of our sanity checks of the packfile.
* | | Merge pull request #1858 from linquize/win32-template-dirVicent Martí2013-09-176-19/+62
|\ \ \ | | | | | | | | Configurable template dir for Win32
| * | | Can load default template directoryLinquize2013-09-183-5/+24
| | | |
| * | | Can git_libgit2_opts() with GIT_OPT_GET_TEMPLATE_PATH and ↵Linquize2013-09-181-0/+13
| | | | | | | | | | | | | | | | GIT_OPT_SET_TEMPLATE_PATH
| * | | Can guess win32 git template dirLinquize2013-09-172-2/+13
| | | |
| * | | Refactor git_win32__find_system_dirs() to extract "etc\\" as subpath parameterLinquize2013-09-173-12/+12
| | | |
* | | | Bug fixes and cleanupsRussell Belfer2013-09-175-28/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This contains a few bug fixes and some header and API cleanups. The main API change is that filters should now use GIT_PASSTHROUGH to indicate that they wish to skip processing a file instead of GIT_ENOTFOUND. The bug fixes include a possible out-of-range buffer access in the ident filter, a filter ordering problem I introduced into the custom filter tests on Windows, and a filter buf NUL termination issue that was coming up on Linux.
* | | | More filtering tests including orderRussell Belfer2013-09-171-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds more tests of filters, including the ident filter when mixed with custom filters. I was able to combine with the reverse filter and demonstrate that the order of filter application with the default priority constants matches the order of core Git. Also, this fixes two issues in the ident filter: preventing ident expansion on binary files and avoiding a NULL dereference when dollar sign characters are found without Id.
* | | | Some tests with ident and crlf filtersRussell Belfer2013-09-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed the filter order to match core Git, too. This test demonstrates an interesting behavior of core Git (which is totally reasonable and which libgit2 matches, although mostly by coincidence). If you use the ident filter and commit a file with a garbage ident in it, like '$Id: this is just garbage$' and then immediately do a 'git checkout-index' with the new file, Git will not consider the file out of date and will not overwrite the file with an updated $Id$. Libgit2 has the same behavior. If you remove the file and then do a checkout-index, it will be replaced with a filtered version that has injected the OID correctly.
* | | | Add clar helpers for testing file equalityRussell Belfer2013-09-171-11/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are a couple of new clar helpers for testing that a file has expected contents that I extracted from the checkout code. Actually wrote this as part of an abandoned earlier attempt at a new filters API, but it will be useful now for some of the tests I'm going to write.
* | | | Fix win32 warningsRussell Belfer2013-09-171-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | I wish MSVC understood that "const char **" is not a const ptr, but it a non-const pointer to an array of const ptrs. Does that seem like too much to ask.
* | | | Port tests from PR 1683Russell Belfer2013-09-171-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | This ports over some of the tests from https://github.com/libgit2/libgit2/pull/1683 by @yorah and @ethomson
* | | | Move binary check to CRLF filter itselfRussell Belfer2013-09-172-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Checkout should not reject binary files from filters, as a filter may actually wish to operate on binary files. The CRLF filter should reject binary files itself if it wishes to. Moreover, the CRLF filter requires this logic so that users can emulate the checkout data in their odb -> workdir filtering. Conflicts: src/checkout.c src/crlf.c
* | | | Merge git_buf and git_bufferRussell Belfer2013-09-1712-219/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes the git_buf struct that was used internally into an externally available structure and eliminates the git_buffer. As part of that, some of the special cases that arose with the externally used git_buffer were blended into the git_buf, such as being careful about git_buf objects that may have a NULL ptr and allowing for bufs with a valid ptr and size but zero asize as a way of referring to externally owned data.
* | | | Add ident filterRussell Belfer2013-09-179-16/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the ident filter (that knows how to replace $Id$) and tweaks the filter APIs and code so that git_filter_source objects actually have the updated OID of the object being filtered when it is a known value.
* | | | Add functions to manipulate filter listsRussell Belfer2013-09-173-8/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend the git2/sys/filter API with functions to look up a filter and add it manually to a filter list. This requires some trickery because the regular attribute lookups and checks are bypassed when this happens, but in the right hands, it will allow a user to have granular control over applying filters.
* | | | Update filter registry codeRussell Belfer2013-09-172-58/+122
| | | | | | | | | | | | | | | | | | | | This updates the git filter registry to be a little cleaner and plugs some memory leaks.
* | | | Add simple global shutdown hooksRussell Belfer2013-09-1710-45/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Increasingly there are a number of components that want to do some cleanup at global shutdown time (at least if there are not going to be memory leaks). This creates a very simple system of shutdown hooks that will be invoked by git_threads_shutdown. Right now, the maximum number of hooks is hardcoded, but since adding a hook is not a public API, it should be fine and I thought it was better to start off with really simple code.
* | | | Fix longstanding valgrind warningRussell Belfer2013-09-171-1/+1
| | | | | | | | | | | | | | | | | | | | There was a possible circumstance that could result in reading past the end of a buffer. This check fixes that.
* | | | Hook up filter initialize callbackRussell Belfer2013-09-171-2/+32
| | | | | | | | | | | | | | | | I knew I forgot something
* | | | Extend public filter api with filter listsRussell Belfer2013-09-179-205/+171
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This moves the git_filter_list into the public API so that users can create, apply, and dispose of filter lists. This allows more granular application of filters to user data outside of libgit2 internals. This also converts all the internal usage of filters to the public APIs along with a few small tweaks to make it easier to use the public git_buffer stuff alongside the internal git_buf.
* | | | Add attributes to filters and fix registryRussell Belfer2013-09-173-62/+264
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The filter registry as implemented was too primitive to actually work once multiple filters were coming into play. This expands the implementation of the registry to handle multiple prioritized filters correctly. Additionally, this adds an "attributes" field to a filter that makes it really really easy to implement filters that are based on one or more attribute values. The lookup and even simple value checking can all happen automatically without custom filter code. Lastly, with the registry improvements, this fills out the filter lifecycle callbacks, with initialize and shutdown callbacks that will be called before the filter is first used and after it is last invoked. This allows for system-wide initialization and cleanup by the filter.