summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* filebuf: follow symlinks when creating a lock filecmn/follow-symlinkCarlos Martín Nieto2015-09-053-3/+137
| | | | | | | We create a lockfile to update files under GIT_DIR. Sometimes these files are actually located elsewhere and a symlink takes their place. In that case we should lock and update the file at its final location rather than overwrite the symlink.
* config: correct documentation for non-existent config fileCarlos Martín Nieto2015-09-031-2/+4
|
* Merge pull request #3402 from ethomson/faster_diffCarlos Martín Nieto2015-09-0119-338/+1442
|\ | | | | Provide path matching in the iterators (for faster diffs)
| * iterator: better document GIT_DIFF_DISABLE_PATHSPEC_MATCHEdward Thomson2015-08-311-4/+6
| |
| * iterator test: handle case (in)sensitivityEdward Thomson2015-08-311-3/+26
| |
| * iterator test: use new iter opts in fifo testEdward Thomson2015-08-311-2/+5
| |
| * iterator: saner pathlist matching for idx iteratorEdward Thomson2015-08-314-86/+147
| | | | | | | | | | | | | | | | | | | | | | | | Some nicer refactoring for index iteration walks. The index iterator doesn't binary search through the pathlist space, since it lacks directory entries, and would have to binary search each index entry and all its parents (eg, when presented with an index entry of `foo/bar/file.c`, you would have to look in the pathlist for `foo/bar/file.c`, `foo/bar` and `foo`). Since the index entries and the pathlist are both nicely sorted, we walk the index entries in lockstep with the pathlist like we do for other iteration/diff/merge walks.
| * diff: drop `FILELIST_MATCH`Edward Thomson2015-08-302-8/+1
| | | | | | | | | | Now that non-pathspec matching diffs are implemented at the iterator level, drop `FILELIST_MATCH`ing.
| * status test: brackets are now literalEdward Thomson2015-08-301-2/+2
| |
| * checkout: use pathlist-based iteratorsEdward Thomson2015-08-301-1/+7
| |
| * tree_iterator: use a pathlistEdward Thomson2015-08-302-1/+148
| |
| * diff: use new iterator pathlist handlingEdward Thomson2015-08-306-135/+246
| | | | | | | | | | | | | | | | When using literal pathspecs in diff with `GIT_DIFF_DISABLE_PATHSPEC_MATCH` turn on the faster iterator pathlist handling. Updates iterator pathspecs to include directory prefixes (eg, `foo/`) for compatibility with `GIT_DIFF_DISABLE_PATHSPEC_MATCH`.
| * diff: better document GIT_DIFF_PATHSPEC_DISABLEEdward Thomson2015-08-282-1/+213
| | | | | | | | | | | | Document that `GIT_DIFF_PATHSPEC_DISABLE` is not necessarily about explicit path matching, but also includes matching of directory names. Enforce this in a test.
| * iterator: sort subdirs properly with pathlistEdward Thomson2015-08-282-7/+22
| | | | | | | | | | | | | | | | | | | | When given a pathlist, don't assume that directories sort before files. Walk through any list of entries sorting before us to make sure that we've exhausted all entries that *aren't* directories. Eg, if we're searching for 'foo/bar', and we have a 'foo.c', keep advancing the pathlist to keep looking for an entry prefixed with 'foo/'.
| * racy-git: TODO to use improved diffingEdward Thomson2015-08-281-0/+1
| |
| * Move filelist into the iterator handling itself.Edward Thomson2015-08-286-23/+405
| |
| * iterator: use an options struct instead of argsEdward Thomson2015-08-2816-275/+423
| |
* | Merge pull request #3401 from phatblat/pb/doc-warningCarlos Martín Nieto2015-08-301-1/+1
|\ \ | | | | | | Escape @ in doc comment
| * | Escape @ in doc commentBen Chatelain2015-08-291-1/+1
| | |
* | | Merge pull request #3352 from ethomson/hiddenEdward Thomson2015-08-285-10/+105
|\ \ \ | |_|/ |/| | win32: ensure hidden files can be staged
| * | win32: ensure hidden files can be stagedEdward Thomson2015-08-035-10/+105
| | |
* | | Merge pull request #3399 from arthurschreiber/patch-8Edward Thomson2015-08-261-1/+1
|\ \ \ | | | | | | | | Fix a typo [ci skip]
| * | | Fix a typo [ci skip]Arthur Schreiber2015-08-261-1/+1
|/ / /
* | | Merge pull request #3396 from ethomson/copyingCarlos Martín Nieto2015-08-251-0/+46
|\ \ \ | | | | | | | | COPYING: include winhttp definition copyright
| * | | COPYING: include winhttp definition copyrightEdward Thomson2015-08-251-0/+46
|/ / / | | | | | | | | | | | | | | | Include the copyright notice from the deps/winhttp/ sources. Move the LGPL to the bottom of the file (since multiple dependencies are LGPL licensed) and include the actual copyright notices from the regex sources.
* | | Merge pull request #3355 from palmin/palmin/fix-2830Carlos Martín Nieto2015-08-251-2/+9
|\ \ \ | | | | | | | | Include the 4 characters not recognised as hex-number in parse_len
| * | | Include the 4 characters not recognised as hex-number when setting error in ↵Anders Borum2015-08-171-2/+9
| | | | | | | | | | | | | | | | parse_len
* | | | Merge pull request #3388 from libgit2/cmn/smart-callbacksCarlos Martín Nieto2015-08-204-0/+55
|\ \ \ \ | | | | | | | | | | transport: provide a way to get the callbacks
| * | | | cred: add a free function wrappercmn/smart-callbacksCarlos Martín Nieto2015-08-192-0/+19
| | | | |
| * | | | transport: provide a way to get the callbacksCarlos Martín Nieto2015-08-192-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libgit2 implementations of smart subtransports can simply reach through the structure, but external implementors cannot. Add these two functions as a way for the smart subtransports to get the callbacks as set by the user.
* | | | | Merge pull request #3389 from libgit2/cmn/old-securityCarlos Martín Nieto2015-08-201-2/+12
|\ \ \ \ \ | |/ / / / |/| | | | CMake: fall back to OpenSSL on older OS X
| * | | | CMake: fall back to OpenSSL on older OS Xcmn/old-securityCarlos Martín Nieto2015-08-191-2/+12
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Starting at OS X 10.8, the Security framework offers some functions which are unified across OS X and iOS. These are the functions that we use. Older versions of OS X do not have these functions and we fail to compile. In these situations, fall back to using OpenSSL for our TLS stream instead.
* | | | Merge pull request #3387 from leoyanggit/build_warningCarlos Martín Nieto2015-08-181-0/+1
|\ \ \ \ | | | | | | | | | | Fix build warning: implicit declaration of function ‘git_transaction_config_new’
| * | | | Fix build warning: implicit declaration of function ↵Leo Yang2015-08-171-0/+1
|/ / / / | | | | | | | | | | | | ‘git_transaction_config_new’
* | | | Merge pull request #3377 from dleehr/fix-push-cbEdward Thomson2015-08-151-1/+1
|\ \ \ \ | | | | | | | | | | Fix bug in git_smart__push: push_transfer_progress cb is only called at end
| * | | | Fix bug in git_smart__push: push_transfer_progress cb is never calledDan Leehr2015-08-131-1/+1
| | | | | | | | | | | | | | | | | | | | The conditional checked cbs->transfer_progress then used the value in cbs->push_transfer_progress. In both cases it should be push_transfer_progress
* | | | | Merge pull request #3384 from libgit2/cmn/regex-nofailEdward Thomson2015-08-152-7/+32
|\ \ \ \ \ | | | | | | | | | | | | diff: don't error out on an invalid regex
| * | | | | diff: don't error out on an invalid regexcmn/regex-nofailCarlos Martín Nieto2015-08-152-7/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When parsing user-provided regex patterns for functions, we must not fail to provide a diff just because a pattern is not well formed. Ignore it instead.
* | | | | | Merge pull request #3383 from libgit2/cmn/http-errorEdward Thomson2015-08-151-1/+9
|\ \ \ \ \ \ | |/ / / / / |/| | | | | http: propagate the credentials callback's error code
| * | | | | http: propagate the credentials callback's error codecmn/http-errorCarlos Martín Nieto2015-08-151-1/+9
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we ask for credentials, the user may choose to return EUSER to indicate that an error has happened on its end and it wants to be given back control. We must therefore pass that back to the user instead of mentioning that it was on_headers_complete() that returned an error code. Since we can, we return the exact error code from the user (other than PASSTHROUGH) since it doesn't cost anything, though using other error codes aren't recommended.
* | | | | Merge pull request #3362 from libgit2/cmn/curl-proxyauth-anyCarlos Martín Nieto2015-08-141-0/+1
|\ \ \ \ \ | | | | | | | | | | | | curl: use the most secure auth method for the proxy
| * | | | | curl: use the most secure auth method for the proxycmn/curl-proxyauth-anyCarlos Martín Nieto2015-08-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When curl uses a proxy, it will only use Basic unless we prompt it to try to use the most secure on it has available. This is something which git did recently, and it seems like a good idea.
* | | | | | Merge pull request #3168 from libgit2/cmn/config-txEdward Thomson2015-08-1310-18/+298
|\ \ \ \ \ \ | | | | | | | | | | | | | | Locking and transactional/atomic updates for config
| * | | | | | config: perform unlocking via git_transactioncmn/config-txCarlos Martín Nieto2015-08-127-26/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes the API for commiting or discarding changes the same as for references.
| * | | | | | config: expose locking via the main APICarlos Martín Nieto2015-08-124-19/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This lock/unlock pair allows for the cller to lock a configuration file to avoid concurrent operations. It also allows for a transactional approach to updating a configuration file. If multiple updates must be made atomically, they can be done while the config is locked.
| * | | | | | config: implement basic transactional supportCarlos Martín Nieto2015-08-124-12/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a configuration file is locked, any updates made to it will be done to the in-memory copy of the file. This allows for multiple updates to happen while we hold the lock, preventing races during complex config-file manipulation.
| * | | | | | config: write the modified file to memoryCarlos Martín Nieto2015-08-121-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of writing into the filebuf directly, make the functions to write the modified config file write into a buffer which can then be dumped into the lockfile for committing. This allows us to re-use the same code for modifying a locked configuration, as we can simply skip the last step of dumping the data to disk.
* | | | | | | Merge pull request #3372 from libgit2/cmn/mirror-refspecEdward Thomson2015-08-122-9/+44
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | remote: don't confuse tag auto-follow rules with refspec matching
| * | | | | | remote: don't confuse tag auto-follow rules with refspec matchingcmn/mirror-refspecCarlos Martín Nieto2015-08-111-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we're looking to update a tag, we can't stop if the tag auto-follow rules don't say to update it. The tag might still match the refspec we were given.
| * | | | | | remote: add failing test for a mirror refspecCarlos Martín Nieto2015-08-111-5/+34
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While we download the remote's remote-tracking branches, we don't download the tag. This points to the tag auto-follow rules interfering with the refspec.