summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Improved error handlingSven Strickroth2013-02-022-4/+19
| | | | Signed-off-by: Sven Strickroth <email@cs-ware.de>
* Get utf8_size from WideCharToMultiByte instead of guessing itSven Strickroth2013-02-012-6/+6
| | | | Signed-off-by: Sven Strickroth <email@cs-ware.de>
* Win32: Make sure error messages are consistently UTF-8 encodedSven Strickroth2013-02-012-11/+24
| | | | | | | | W/o this a libgit2 error message could have a mixed encoding: e.g. a filename in UTF-8 combined with a native Windows error message encoded with the local code page. Signed-off-by: Sven Strickroth <email@cs-ware.de>
* Fix a mutex leak in pack.cPhilip Kelley2013-01-261-0/+1
|
* Fix 3 memory leaksPhilip Kelley2013-01-251-0/+1
|
* Merge pull request #1279 from carlosmn/config-trailing-backslashVicent Martí2013-01-251-1/+8
|\ | | | | config: support trailing backslashes
| * config: support trailing backslashesCarlos Martín Nieto2013-01-251-1/+8
| | | | | | | | | | | | Check whether the backslash at the end of the line is being escaped or not so as not to consider it a continuation marker when it's e.g. a Windows-style path.
* | clone: Prevent segfault upon faulted remote creationnulltoken2013-01-251-3/+6
|/
* Added git_branch_name().Sebastian Bauer2013-01-251-0/+21
| | | | | | | | | This is a convenience function to get the branch name of a given ref. The returned branch name is compatible with the name that can be supplied e.g. to git_branch_lookup(). That is, the prefixes "refs/heads" or "refs/remotes" are omitted. Also added a new test for testing the new function.
* index: Speed up loading a tree into the indexScott J. Goldman2013-01-241-3/+8
| | | | | | The index is empty; repeated tree entries cannot collide. cc github/gitrpc#83
* Merge pull request #1250 from jamill/push_update_tipsPhilip Kelley2013-01-241-0/+54
|\ | | | | Update remote tips on push
| * Update remote tips on pushJameson Miller2013-01-221-0/+54
| |
* | opts: Add getters tooVicent Marti2013-01-231-2/+10
| |
* | Merge pull request #1271 from libgit2/global-settingsVicent Martí2013-01-222-16/+30
|\ \ | | | | | | Global options setter
| * | Global options setterVicent Marti2013-01-232-16/+30
| | |
* | | Merge pull request #1270 from libgit2/packed-peeled-objects-fixRussell Belfer2013-01-221-4/+8
|\ \ \ | | | | | | | | Allow peeled references without trailing newline at end of file
| * | | Allow peeled references without trailing newline at end of fileScott J. Goldman2013-01-221-4/+8
| | | | | | | | | | | | | | | | Also ammends one of the tag tests to make sure it's working.
* | | | Fix case sensitivity bug with tree iteratorsRussell Belfer2013-01-221-3/+5
|/ / / | | | | | | | | | | | | | | | | | | | | | With the new code to make tree iterators support ignore_case, there is a bug in setting the start entry for range bounded iterators where memcmp was being used instead of strncasecmp. This fixes that and expands the tree iterator test to cover the cases that were broken.
* | | Revert "Handle packed peeled objects without trailing newlines"Scott J. Goldman2013-01-221-6/+3
| | | | | | | | | | | | | | | | | | This reverts commit 28b1cdf3a1bdcd37cf9d550c92b8c19b1782ea6b. //cc #1262 #1267
* | | Merge pull request #1268 from phkelley/developmentVicent Martí2013-01-221-13/+16
|\ \ \ | |_|/ |/| | A simple perf optimization in pack-objects.c
| * | A simple perf optimization in pack-objects.cPhilip Kelley2013-01-221-13/+16
| | |
* | | Fix gen_pktline format specifier for Win32Philip Kelley2013-01-222-1/+3
|/ /
* | Merge pull request #1267 from libgit2/no-newlineVicent Martí2013-01-211-3/+6
|\ \ | | | | | | Handle packed peeled objects without trailing newlines
| * | Handle packed peeled objects without trailing newlinesScott J. Goldman2013-01-211-3/+6
| |/ | | | | | | Fixes #1262
* | Parse commit time as uint64_t to avoid overflowRussell Belfer2013-01-211-2/+2
|/ | | | | | | The commit time is already stored as a git_time_t, but we were parsing is as a uint32_t. This just switches the parser to use uint64_t which will handle dates further in the future (and adds some tests of those future dates).
* commit: don't include the LF in the header field valueCarlos Martín Nieto2013-01-201-2/+3
| | | | | | | | | When the encoding header changed to be treated as an additional header, the EOL pointer started to point to the byte after the LF, making the git__strndup call copy the LF into the value. Increase the EOL pointer value after copying the data to keep the rest of the semantics but avoid copying LF.
* Fix compilation on OpenBSDCarlos Martín Nieto2013-01-201-0/+1
|
* Fix really bad error handling in git_smart__negotiate_fetchPhilip Kelley2013-01-181-21/+45
|
* Merge pull request #1239 from ethomson/index_removeVicent Martí2013-01-173-3/+18
|\ | | | | add an index_remove_bypath that removes conflicts
| * add an index_remove_bypath that removes conflicts, renamed add_from_workdir ↵Edward Thomson2013-01-123-3/+18
| | | | | | | | to match
* | Merge pull request #1244 from carlosmn/pack-evictVicent Martí2013-01-171-12/+7
|\ \ | | | | | | A comparison of eviction algorithms for the delta base cache
| * | pack: evict all of the pages at onceCarlos Martín Nieto2013-01-141-31/+4
| | | | | | | | | | | | | | | | | | Somewhat surprisingly, this can increase the speed considerably, as we don't bother trying to decide what to evict, and the most used entries are quickly back into the cache.
| * | pack: evict objects from the cache in groups of eightCarlos Martín Nieto2013-01-141-11/+33
| | | | | | | | | | | | | | | This drops the cache eviction below libcrypto and zlib in the perf output. The number has been chosen empirically.
* | | Merge pull request #1247 from ↵Ben Straub2013-01-171-0/+6
|\ \ \ | | | | | | | | | | | | | | | | sba1/dont-segfault-if-transport-doesnt-support-push Don't segfault if transport doesn't support push.
| * | | Don't segfault if transport doesn't support push.Sebastian Bauer2013-01-171-0/+6
| | | | | | | | | | | | | | | | Instead, set an more informative error message.
* | | | Merge pull request #1255 from arrbee/fix-signed-commit-header-parsingVicent Martí2013-01-171-14/+16
|\ \ \ \ | | | | | | | | | | Add skipping of unknown commit headers
| * | | | Add skipping of unknown commit headersRussell Belfer2013-01-171-14/+16
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | This moves the check for the "encoding" header into a loop which is just scanning for non-required headers at the end of a commit header. That loop will skip unrecognized lines (including header continuation lines) until a terminating completely blank line is found, and only then does it move to reading the commit message.
* | | | cache should contain on-disk (filtered) file sizeEdward Thomson2013-01-171-3/+1
|/ / /
* | | Merge pull request #1211 from arrbee/fix-icase-status-fileVicent Martí2013-01-1614-201/+450
|\ \ \ | | | | | | | | Fix case insensitivity issues in git_status_file
| * | | Shortcut spool and sort for empty iteratorRussell Belfer2013-01-151-0/+5
| | | |
| * | | Support case insensitive tree iterators and statusRussell Belfer2013-01-153-30/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes tree iterators directly support case insensitivity by using a secondary index that can be sorted by icase. Also, this fixes the ambiguity check in the git_status_file API to also be case insensitive. Lastly, this adds new test cases for case insensitive range boundary checking for all types of iterators. With this change, it should be possible to deprecate the spool and sort iterator, but I haven't done that yet.
| * | | Add git_tree_entry_cmp and git_tree_entry_icmpRussell Belfer2013-01-152-6/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a new external API git_tree_entry_cmp and a new internal API git_tree_entry_icmp for sorting tree entries. The case insensitive one is internal only because general users should never be seeing case-insensitively sorted trees.
| * | | Add git_path_icmp to case-insensitive path cmpRussell Belfer2013-01-152-1/+30
| | | | | | | | | | | | | | | | This adds git_path_icmp to complement git_path_cmp.
| * | | Add payload "_r" versions of bsearch and tsortRussell Belfer2013-01-153-25/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git__bsearch and git__tsort did not pass a payload through to the comparison function. This makes it impossible to implement sorted lists where the sort order depends on external data (e.g. building a secondary sort order for the entries in a tree). This commit adds git__bsearch_r and git__tsort_r versions that pass a third parameter to the cmp function of a user payload.
| * | | Update iterator API with flags for ignore_caseRussell Belfer2013-01-155-76/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the iterator API so that flags can be passed in to the constructor functions to control the ignore_case behavior. At this point, the flags are not supported on tree iterators (i.e. there is no functional change over the old API), but the API changes are all made to accomodate this. By the way, I went with a flags parameter because in the future I have a couple of other ideas for iterator flags that will make it easier to fix some diff/status/checkout bugs.
| * | | Fix err msg for ambiguous path in git_status_fileRussell Belfer2013-01-151-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Returning GIT_EAMBIGUOUS from inside the status callback gets overridden with GIT_EUSER. `git_status_file` accounted for this via the callback payload, but was allowing the error message to be cleared. Move the `giterr_set` call outside the callback to where the EUSER case was being dealt with.
| * | | Minor iterator API cleanupsRussell Belfer2013-01-153-55/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In preparation for further iterator changes, this cleans up a few small things in the iterator API: * removed the git_iterator_for_repo_index_range API * made git_iterator_free not be inlined * minor param name and test function name tweaks
| * | | Simplify git_diff__paired_foreach icase handlingRussell Belfer2013-01-151-16/+12
| | | |
* | | | branch: Introduce git_branch_tracking_name()nulltoken2013-01-164-22/+107
| | | |
* | | | Fix indentationsnulltoken2013-01-161-4/+4
|/ / /