summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | ignore: add test and adjust style and comment for dir with wildmatchCarlos Martín Nieto2015-09-131-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous commit left the comment referencing the earlier state of the code, change it to explain the current logic. While here, change the logic to avoid repeating the copy of the base pattern.
| * | | | Fix 'If we're dealing with a directory' checkVsevolod Parfenov2015-08-241-1/+1
| | | | |
* | | | | Merge pull request #3370 from libgit2/cmn/submodule-refactorCarlos Martín Nieto2015-09-131-144/+219
|\ \ \ \ \ | | | | | | | | | | | | submodule: refactor to be more explicit in the search
| * | | | | submodule: refactor to be more explicit in the searchCarlos Martín Nieto2015-09-101-144/+219
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When searching for information about a submdoule, let's be more explicit in what we expect to find. We currently insert a submodule into the map and change certain parameters when the config callback gets called. Switch to asking for the configuration we're interested in, rather than taking it in an arbitrary order.
* | | | | diff: check pathspec on non-filesEdward Thomson2015-09-121-8/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we're not doing pathspec matching, we let the iterator handle file matching for us. However, we can only trust the iterator to return *files* that match the pattern, because the iterator must return directories that are not strictly in the pathlist, but that are the parents of files that match the pattern, so that diff can later recurse into them. Thus, diff must examine non-files explicitly before including them in the delta list.
* | | | | mempack: expose clear functionEdward Thomson2015-09-112-4/+3
| | | | |
* | | | | Removing memory leak in mempack's freeBryan Woods2015-09-111-2/+6
| | | | | | | | | | | | | | | | | | | | It calls git_mempack_reset which reallocates the object array. git_oidmap_free is now called on it explicitly.
* | | | | Fixing dangling pointers in git_mempack_resetBryan Woods2015-09-101-0/+3
|/ / / / | | | | | | | | | | | | git_mempack_reset was leaving free'd pointers in the oidmap.
* | | | Merge pull request #3379 from theseion/additional_libssh2_error_reportingCarlos Martín Nieto2015-09-091-1/+3
|\ \ \ \ | | | | | | | | | | report libssh2 error if list of authentication methods can't be retrieved
| * | | | added a single line of additional error reporting from libssh2 when failing ↵Max Leske2015-08-141-1/+3
| | | | | | | | | | | | | | | | | | | | to retrieve the list of authentication methods
* | | | | Merge pull request #3353 from ethomson/wrongcase_addCarlos Martín Nieto2015-09-081-22/+114
|\ \ \ \ \ | | | | | | | | | | | | index: canonicalize directory case when adding
| * | | | | git_index_add: allow case changing renamesEdward Thomson2015-09-081-15/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On case insensitive platforms, allow `git_index_add` to provide a new path for an existing index entry. Previously, we would maintain the case in an index entry without the ability to change it (except by removing an entry and re-adding it.) Higher-level functions (like `git_index_add_bypath` and `git_index_add_frombuffers`) continue to keep the old path for easier usage.
| * | | | | index: canonicalize directory case when addingEdward Thomson2015-09-081-7/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On case insensitive systems, when given a user-provided path in the higher-level index addition functions (eg `git_index_add_bypath` / `git_index_add_frombuffer`), examine the index to try to match the given path to an existing directory. Various mechanisms can cause the on-disk representation of a folder to not match the representation in HEAD or the index - for example, a case changing rename of some file `a/file.txt` to `A/file.txt` will update the paths in the index, but not rename the folder on disk. If a user subsequently adds `a/other.txt`, then this should be stored in the index as `A/other.txt`.
* | | | | | Merge pull request #3381 from leoyanggit/index_directory_iteratorEdward Thomson2015-09-081-0/+24
|\ \ \ \ \ \ | |/ / / / / |/| | | | | New feature: add the ablility to iterate through a directory in index
| * | | | | New API: git_index_find_prefixLeo Yang2015-09-041-0/+24
| | |_|/ / | |/| | | | | | | | | | | | | Find the first index entry matching a prefix.
* | | | | Merge pull request #3413 from libgit2/cmn/follow-symlinkEdward Thomson2015-09-061-3/+81
|\ \ \ \ \ | | | | | | | | | | | | filebuf: follow symlinks when creating a lock file
| * | | | | filebuf: follow symlinks when creating a lock filecmn/follow-symlinkCarlos Martín Nieto2015-09-051-3/+81
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | Merge pull request #3366 from libgit2/cmn/index-hashmapEdward Thomson2015-09-063-17/+193
|\ \ \ \ \ | |/ / / / |/| | | | Use a hashmap for path-based lookups in the index
| * | | | index: put the icase insert choice in macroscmn/index-hashmapCarlos Martín Nieto2015-09-041-25/+30
| | | | | | | | | | | | | | | | | | | | | | | | | This should let us see more clearly what we're doing and avoid the ugly 'if' we need every time we want to interact with the map.
| * | | | index: keep a hash table as well as a vector of entriesCarlos Martín Nieto2015-08-142-17/+96
| | | | | | | | | | | | | | | | | | | | | | | | | The hash table allows quick lookup of specific paths, while we use the vector for enumeration.
| * | | | Add a hashmap for index entriesCarlos Martín Nieto2015-08-141-0/+92
| | | | | | | | | | | | | | | | | | | | They are hashed case-insensitively and take the stage into account.
* | | | | Merge pull request #3402 from ethomson/faster_diffCarlos Martín Nieto2015-09-0111-174/+474
|\ \ \ \ \ | | | | | | | | | | | | Provide path matching in the iterators (for faster diffs)
| * | | | | iterator: saner pathlist matching for idx iteratorEdward Thomson2015-08-312-62/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that non-pathspec matching diffs are implemented at the iterator level, drop `FILELIST_MATCH`ing.
| * | | | | checkout: use pathlist-based iteratorsEdward Thomson2015-08-301-1/+7
| | | | | |
| * | | | | tree_iterator: use a pathlistEdward Thomson2015-08-301-1/+34
| | | | | |
| * | | | | diff: use new iterator pathlist handlingEdward Thomson2015-08-304-128/+210
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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`.
| * | | | | iterator: sort subdirs properly with pathlistEdward Thomson2015-08-281-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-284-23/+150
| | | | | |
| * | | | | iterator: use an options struct instead of argsEdward Thomson2015-08-2811-117/+144
| | |_|_|/ | |/| | |
* | | | | Merge pull request #3352 from ethomson/hiddenEdward Thomson2015-08-283-10/+44
|\ \ \ \ \ | |/ / / / |/| | | | win32: ensure hidden files can be staged
| * | | | win32: ensure hidden files can be stagedEdward Thomson2015-08-033-10/+44
| | | | |
* | | | | 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
* | | | | cred: add a free function wrappercmn/smart-callbacksCarlos Martín Nieto2015-08-191-0/+8
| | | | |
* | | | | transport: provide a way to get the callbacksCarlos Martín Nieto2015-08-191-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | 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-151-7/+6
|\ \ \ \ \ \ | | | | | | | | | | | | | | diff: don't error out on an invalid regex
| * | | | | | diff: don't error out on an invalid regexcmn/regex-nofailCarlos Martín Nieto2015-08-151-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | | | 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-136-18/+207
|\ \ \ \ \ | | | | | | | | | | | | Locking and transactional/atomic updates for config
| * | | | | config: perform unlocking via git_transactioncmn/config-txCarlos Martín Nieto2015-08-124-2/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-121-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-122-12/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.