summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #3245 from libgit2/cmn/no-growv0.22.3maint/v0.22Edward Thomson2015-06-231-6/+4
|\ | | | | blob: don't recomment using git_buf_grow
| * blob: don't recomment using git_buf_growcmn/no-growCarlos Martín Nieto2015-06-231-6/+4
|/ | | | | | | | | We currently recommend using `git_buf_grow` in order to make a buffer make an owned copy of the memory it points to. This is not behaviour we should encourage, so remove this recommendation. The function itself is not changed, as we need to remain compatible, but it will be changed not to allow usage on borrowed buffers.
* Bump version to 0.22.3Carlos Martín Nieto2015-06-231-2/+2
|
* Merge pull request #3242 from libgit2/cmn/maint-updateCarlos Martín Nieto2015-06-2219-29/+119
|\ | | | | Another round of backports
| * appveyor: build maint branchescmn/maint-updateCarlos Martín Nieto2015-06-221-0/+1
| |
| * travis: build maint branchesCarlos Martín Nieto2015-06-221-1/+1
| |
| * travis: fail if we fail the push testsCarlos Martín Nieto2015-06-221-2/+2
| | | | | | | | | | | | These tests were not being taken into consideration for the failure of the test. They've been failing for a while now, but we hadn't noticed as Travis was reporting the builds successful.
| * path: error out if the callback returns an errorCarlos Martín Nieto2015-06-222-2/+24
| | | | | | | | | | | | | | When the callback returns an error, we should stop immediately. This broke when trying to make sure we pass specific errors up the chain. This broke cancelling out of the loose backend's foreach.
| * indexer: use lseek to extend the packfileCarlos Martín Nieto2015-06-221-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We've been using `p_ftruncate()` to extend the packfile in order to mmap it and write the new data into it. This works well in the general case, but as truncation does not allocate space in the filesystem, it must do so when we write data to it. The only way the OS has to indicate a failure to allocate space is via SIGBUS which means we tried to write outside the file. This will cause everyone to crash as they don't expect to handle this signal. Switch to using `p_lseek()` and `p_write()` to extend the file in a way which tells the filesystem to allocate the space for the missing data. We can then be sure that we have space to write into.
| * clone: fall back to copying when linking does not workCarlos Martín Nieto2015-06-221-2/+15
| | | | | | | | | | | | | | | | | | | | | | We use heuristics to make a decent guess at when we can save time and space by linking object files during a clone. Unfortunately checking the device id isn't enough, as those would be the same during e.g. a bind-mount, but the OS still does not allow us to link between mounts of the same filesystem. If we fail to perform the links, fall back to copying the contents into a new file as a last attempt.
| * Fix ident replacement to match Git behaviorColomban Wendling2015-06-225-17/+17
| | | | | | | | | | Git inserts a space after the SHA1 (as of 2.1.4 at least), so do the same.
| * indexer: avoid loading already existent basesEdward Thomson2015-06-221-1/+14
| | | | | | | | | | When thickening a pack, avoid loading already loaded bases and trying to insert them all over again.
| * indexer: don't look for the index we're creatingEdward Thomson2015-06-221-0/+7
| | | | | | | | | | | | When creating an index, know that we do not have an index for our own packfile, preventing some unnecessary file opens and error reporting.
| * refspec: make sure matching refspecs have src, dst and input stringsCarlos Martín Nieto2015-06-222-0/+16
| | | | | | | | | | | | | | | | When we find out that we're dealing with a matching refspec, we set the flag and return immediately. This leaves the strings as NULL, which breaks the contract. Assign these pointers to a string with the correct values.
| * Call the openssl API to be able to work with SNI servers.Cristian Oneț2015-06-221-0/+3
| |
| * Add a missing include for resetCarlos Martín Nieto2015-06-221-0/+1
| | | | | | | | | | Our doc parser really wants the types to be declared in the header it's reading.
| * ssh: read from stderr if stdout is emptyCarlos Martín Nieto2015-06-221-1/+8
| | | | | | | | | | | | | | | | When we fail to read from stdout, it's typically because the URL was wrong and the server process has sent some output over its stderr output. Read that output and set the error message to whatever we read from it.
| * fileops: set an error on write error for file copyCarlos Martín Nieto2015-06-221-0/+3
| | | | | | | | | | | | We set an error if we get an error when reading, but we don't bother setting an error message for write failing. This causes a cryptic error to be shown to the user when the target filesystem is full.
| * fileops: set an error message if we fail to link a fileCarlos Martín Nieto2015-06-221-1/+2
| | | | | | | | | | Now that `git_path_direach` lets us specify an error message to report, set an appropriate error message while linking.
| * path: don't let direach overwrite the callback's error messageCarlos Martín Nieto2015-06-221-1/+3
|/ | | | | | | | | | This function deals with functions doing IO which means the amount of errors that can happen is quit large. It does not help if it always ovewrites the underlying error message with a less understandable version of "something went wrong". Instead, only use this generic message if there was no error set by the callback.
* Merge pull request #3154 from tkelman/win-openssl-v0.22Carlos Martín Nieto2015-06-151-3/+6
|\ | | | | Fix MinGW build against openssl on maint/v0.22
| * Don't include headers on windows that aren't availableAki Koskinen2015-05-221-3/+6
| | | | | | | | This mainly concerns mingw build.
* | Merge pull request #3138 from libgit2/cmn/v22-updateCarlos Martín Nieto2015-06-0215-60/+293
|\ \ | |/ |/| Maintenance updates for v0.22
| * Include git2/transaction.hcmn/v22-updateCarlos Martín Nieto2015-05-311-0/+1
| | | | | | | | This was forgotten when the feature was implemented.
| * Attributes: don't match files for foldersCarlos Martín Nieto2015-05-183-44/+100
| | | | | | | | | | | | | | | | Merge of pull request #3119 from ethomson/ignore as a single commit. Conflicts: src/attr.c tests/attr/ignore.c
| * Do not call regfree() on an empty regex that is not successfully created by ↵Yong Li2015-05-181-3/+2
| | | | | | | | | | | | regcomp (also removed an unused member "has_regex" from all_iter)
| * Fix wrong format string in git_reflog_drop() error messageLinquize2015-05-181-1/+1
| |
| * attr_file: fix subdirectory attr case.Mike McQuaid2015-05-181-1/+8
| | | | | | | | Closes #2966.
| * ignore: fix negative ignores without wildcards.Patrick Steinhardt2015-05-182-5/+98
| |
| * Fix checking of return value for regcomp.Patrick Steinhardt2015-05-184-6/+18
| | | | | | | | | | | | | | | | The regcomp function returns a non-zero value if compilation of a regular expression fails. In most places we only check for negative values, but positive values indicate an error, as well. Fix this tree-wide, fixing a segmentation fault when calling git_config_iterator_glob_new with an invalid regexp.
| * revwalk: don't insert uninteresting commits into the queueCarlos Martín Nieto2015-05-181-0/+4
| | | | | | | | | | | | | | When a commit is first set as unintersting and then pushed, we must take care that we do not put it into the commit list as that makes us return at least that commit (but maybe more) as we've inserted it into the list because we have the assumption that we want anything in the commit list.
| * revwalk: detect when we're out of interesting commitsCarlos Martín Nieto2015-05-181-2/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When walking backwards and marking parents uninteresting, make sure we detect when the list of commits we have left has run out of uninteresting commits so we can stop marking commits as uninteresting. Failing to do so can mean that we walk the whole history marking everything uninteresting, which eats up time, CPU and IO for with useless work. While pre-marking does look for this, we still need to check during the main traversal as there are setups for which pre-marking does not leave enough information in the commits. This can happen if we push a commit and hide its parent.
| * Fix git_checkout_tree() to do index filemodes correctly on Windows.John Fultz2015-05-182-2/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git_checkout_tree() has some fallback behaviors for file systems which don't have full support of filemodes. Generally works fine, but if a given file had a change of type from a 0644 to 0755 (i.e., you add executable permissions), the fallback behavior incorrectly triggers when writing hte updated index. This would cause a git_checkout_tree() command, even with the GIT_CHECKOUT_FORCE option set, to leave a dirty index on Windows. Also added checks to an existing test to catch this case. Conflicts: src/checkout.c
| * Make sure to also update delta->nfiles when merging diffsPierre-Olivier Latour2015-05-181-2/+8
|/ | | | | | | When diffs are generated, the value for the 'nfiles' field of 'git_diff_delta' will be consistent with the value in the 'status' field. Merging diffs can modify the 'status' field of some deltas and the 'nfiles' field needs to be updated accordingly.
* Bump version to 0.22.2v0.22.2Carlos Martín Nieto2015-03-241-2/+2
|
* Merge pull request #3005 from libgit2/cmn/maint-updateCarlos Martín Nieto2015-03-2427-36/+243
|\ | | | | Backports for the maint branch
| * git: make sure to close the network streamCarlos Martín Nieto2015-03-211-0/+1
| | | | | | | | | | In case of a bad url or other error during the connection setup, we close the stream via free.
| * checkout: free last created directoryEdward Thomson2015-03-211-0/+1
| |
| * Initialize refs vector in git_remote_update_tips().Sebastian Bauer2015-03-211-1/+1
| | | | | | | | | | Otherwise, bailing out early when ls_to_vector() fails accesses uninitialized memory.
| * Lower case the include directive of windows headerClaudiu Olteanu2015-03-211-1/+1
| | | | | | | | Since the Linux platform has a case sensitive file system, the header name should be lower case for cross compiling purposes. (On Linux, the mingw header is called ```windows.h```).
| * http: do not try to use the cert callback on unencrypted streamsCarlos Martín Nieto2015-03-212-1/+7
| | | | | | | | | | | | | | | | | | When the user has a certificate check callback set, we still have to check whether the stream we're using is even capable of providing a certificate. In the case of an unencrypted certificate, do not ask for it from the stream, and do not call the callback.
| * indexer: set an error message on duplicate objects in packCarlos Martín Nieto2015-03-211-0/+1
| | | | | | | | | | | | While this is not even close to a fix, we can at least set an error message so we know which error we are facing. Up to know we just returned an error without a message.
| * Put back the number of expected references to 6 from the test repoCarlos Martín Nieto2015-03-211-3/+3
| | | | | | | | | | | | | | This was but down to 5 when GitHub made a change to their server which made them stop honouring the include-tag request. This has recently been corrected, so we can bring it back up to six.
| * Fixed active refspecs not reset by git_remote_upload()Pierre-Olivier Latour2015-03-211-0/+4
| |
| * http: enforce the credential typesCarlos Martín Nieto2015-03-211-0/+5
| | | | | | | | | | | | The user may decide to return any type of credential, including ones we did not say we support. Add a check to make sure the user returned an object of the right type and error out if not.
| * branch: do capture the error codeCarlos Martín Nieto2015-03-211-1/+1
| | | | | | | | | | We want to ignore GIT_ENOTFOUND, but for that we need to capture the error code from the reflog deletion.
| * git_branch_delete() should ignore errors from non-existing reflogsPierre-Olivier Latour2015-03-211-1/+6
| |
| * Fix Mac build without OpenSSLLeo Yang2015-03-211-1/+2
| | | | | | | | | | | | | | If OpenSSL is disabled on Mac the SHA1 implementation goes to the CommonCrypto from the system. In this case we should not include the generic hash impl. Otherwise there would be duplicated impls which fail the build.
| * Fix race in git_packfile_unpack.Jason Haslam2015-03-211-2/+9
| | | | | | | | | | | | Increment refcount of newly added cache entries just like existing entries looked up from the cache. Otherwise the new entry can be evicted from the cache and destroyed while it's still in use.
| * Reinit `reader` pointer after reading included config fileYury G. Kudryashov2015-03-211-0/+1
| | | | | | | | | | | | Fixes #2869. If included file includes more files, it may reallocate cfg_file->readers, hence invalidate not only `r` pointer, but `result` pointer as well.