summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* revwalk: detect when we're out of interesting commitscmn/odd-slowdownCarlos Martín Nieto2015-04-141-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.
* Merge pull request #2974 from libgit2/cmn/clone-everythingEdward Thomson2015-04-103-3/+40
|\ | | | | Make sure to pack referenced objects for non-branches
| * local: recusrively insert non-branch objects into the packfilecmn/clone-everythingCarlos Martín Nieto2015-03-171-1/+2
| | | | | | | | | | | | | | | | | | When we insert e.g. a tag or tagged object into the packfile, we must make sure to insert any referenced objects as well, or we will have broken links. Use the recursive version of packfile insertion to make sure we send over not just the tagged object but also the objects it references.
| * tree: add more correct error messages for not foundCarlos Martín Nieto2015-03-171-2/+2
| | | | | | | | | | Don't use the full path, as that's not what we are asserting does not exist, but just the subpath we were looking up.
| * packbuilder: introduce git_packbuilder_insert_recur()Carlos Martín Nieto2015-03-171-0/+36
| | | | | | | | | | | | This function recursively inserts the given object and any referenced ones. It can be thought of as a more general version of the functions to insert a commit or tree.
* | Merge pull request #3030 from linquize/symlink_supportedEdward Thomson2015-04-101-3/+5
|\ \ | | | | | | If work_dir is not specified, use repo_dir to test if symlink is supported
| * | For bare repository, use repo_dir to test if symlinks are supportedLinquize2015-04-041-3/+5
| | |
* | | Merge branch 'pr/3035'Edward Thomson2015-04-101-4/+4
|\ \ \
| * | | ISO C90 forbids mixed declarations and codeJozef Matula2015-04-081-4/+4
| | | | | | | | | | | | | | | | | | | | GIT_UNUSED() macro generates code therefore it should be used after variable declarations.
* | | | Fix checking of return value for regcomp.Patrick Steinhardt2015-04-103-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | describe: only abort without tags if fallback is not allowed.Patrick Steinhardt2015-04-071-1/+1
|/ / / | | | | | | | | | | | | | | | When no reference names could be found we did error out when trying to describe a commit. This is wrong, though, when the option to fall back to a commit's object ID is set.
* | | Entry argument passed to git_index_add_frombuffer() should be constPierre-Olivier Latour2015-04-031-1/+1
| | |
* | | Merge pull request #3011 from ethomson/filter_zero_tempbufEdward Thomson2015-03-251-0/+3
|\ \ \ | | | | | | | | Clear temporary buffer when filtering
| * | | filter: clear the temp_buf if we're using oneEdward Thomson2015-03-251-0/+3
| | | | | | | | | | | | | | | | | | | | If we are using a temporary buffer for filtering, be sure to clear it before using it, in case the file that we are filtering is empty.
* | | | squash some leaksEdward Thomson2015-03-242-5/+5
| | | |
* | | | Merge pull request #2990 from leoyanggit/custom_paramEdward Thomson2015-03-246-8/+18
|\ \ \ \ | | | | | | | | | | Add a custom param to git_smart_subtransport_definition
| * | | | Add a custom param to git_smart_subtransport_definitionLeo Yang2015-03-186-8/+18
| | | | | | | | | | | | | | | | | | | | | | | | | The smart transport has already take the payload param. For the sub transport a payload param is useful for the implementer.
* | | | | Merge pull request #2986 from tkelman/mingw_winhttpEdward Thomson2015-03-241-22/+27
|\ \ \ \ \ | | | | | | | | | | | | WinHTTP for MinGW
| * | | | | Use swprintf_s everywhere except mingw.orgTony Kelman2015-03-191-3/+7
| | | | | |
| * | | | | Fix build on mingw-w64Alex Crichton2015-03-161-2/+2
| | | | | |
| * | | | | Win32: Enable WinHTTP for MinGWPhilip Kelley2015-03-161-23/+24
| | | | | |
* | | | | | Merge pull request #2947 from libgit2/cmn/notes-bufEdward Thomson2015-03-241-21/+40
|\ \ \ \ \ \ | | | | | | | | | | | | | | note: use a git_buf to return the default namespace
| * | | | | | note: use a git_buf to return the default namespacecmn/notes-bufCarlos Martín Nieto2015-03-171-21/+40
| | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The caller has otherwise no way to know how long the string will be allocated or ability to free it. This fixes #2944.
* | | | | | Merge pull request #3010 from ethomson/checkout_invalid_path_errCarlos Martín Nieto2015-03-241-1/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | checkout: report correct invalid path
| * | | | | | checkout: report correct invalid pathEdward Thomson2015-03-231-1/+1
| | | | | | |
* | | | | | | 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.
* | | | | | mkdir-ext: Retry lstat on EEXIST racevmg/mkdir-extVicent Marti2015-03-191-5/+14
| | | | | |
* | | | | | Merge pull request #2996 from ethomson/dll_commentsCarlos Martín Nieto2015-03-191-2/+6
|\ \ \ \ \ \ | | | | | | | | | | | | | | win32 resource: allow custom comments field in DLL
| * | | | | | win32 resource: allow custom comments field in DLLEdward Thomson2015-03-181-2/+6
| | |_|_|_|/ | |/| | | |
* | | | | | Merge pull request #2967 from jacquesg/merge-whitespaceEdward Thomson2015-03-182-6/+23
|\ \ \ \ \ \ | |/ / / / / |/| | | | | Allow merges of files (and trees) with whitespace problems/fixes
| * | | | | Added options to enable patience and minimal diff driversJacques Germishuys2015-03-161-0/+6
| | | | | |
| * | | | | Collapse whitespace flags into git_merge_file_flags_tJacques Germishuys2015-03-162-8/+8
| | | | | |
| * | | | | Renamed git_merge_options 'flags' to 'tree_flags'Jacques Germishuys2015-03-161-2/+2
| | | | | |
| * | | | | Allow for merges with whitespace discrepanciesJacques Germishuys2015-03-162-4/+15
| | |_|/ / | |/| | |
* | | | | Merge pull request #2955 from git-up/update_tips_fixesCarlos Martín Nieto2015-03-182-13/+18
|\ \ \ \ \ | | | | | | | | | | | | Update tips fixes
| * | | | | Fixed active refspecs not reset by git_remote_upload()Pierre-Olivier Latour2015-03-111-0/+4
| | | | | |
| * | | | | Fixed update_tips callback called for failed pushed referencesPierre-Olivier Latour2015-03-111-13/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current implementation does not set 'fire_callback' back to 0 for failed updates so the callback still fires. Instead of adding yet another condition check to set 'fire_callback' to 0 if needed, considering this function should be a no-op for failed updates anyway, the best fix is to simplify its logic to check upfront if the update is a failed one.
* | | | | | Merge remote-tracking branch 'ethomson/submodule_8dot3'Carlos Martín Nieto2015-03-183-61/+167
|\ \ \ \ \ \
| * | | | | | repository: Introduce "reserved names"Edward Thomson2015-02-273-61/+166
| | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A repository can have multiple "reserved names" now, not just a single "short name" for the repository folder itself. Refactor to include a git_repository__reserved_names that returns all the reserved names for a repository.
* | | | | | Merge pull request #2983 from ↵Edward Thomson2015-03-172-9/+19
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | jeffhostetler/jeffhostetler/perf_merge_lazy_binary_check PERF: In MERGE, lazily compute is_binary
| * | | | | | PERF: In MERGE, lazily compute is_binaryJeff Hostetler2015-03-162-9/+19
| | |_|/ / / | |/| | | |
* | | | | | Initialize refs vector in git_remote_update_tips().Sebastian Bauer2015-03-171-1/+1
| |_|_|/ / |/| | | | | | | | | | | | | | | | | | | Otherwise, bailing out early when ls_to_vector() fails accesses uninitialized memory.
* | | | | Merge pull request #2962 from libgit2/cmn/reflog-annotatedEdward Thomson2015-03-174-10/+98
|\ \ \ \ \ | | | | | | | | | | | | Add annotated versions of ref-modying functions
| * | | | | annotated_commit: provide a constructor from a revspecCarlos Martín Nieto2015-03-161-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This extra constructor will be useful for the annotated versions of ref-modifying functions, as it allows us to create a commit with the extended sha syntax which was used to retrieve it.
| * | | | | Add annotated commit versions of reflog-modifying functionsCarlos Martín Nieto2015-03-163-10/+70
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We do not always want to put the id directly into the reflog, but we want to speicfy what a user typed. For this use-case we provide annotated version of a few functions which let the caller specify what user-friendly name was used when asking for the operation.
* | | | | Merge pull request #2972 from libgit2/cmn/pack-objects-walkEdward Thomson2015-03-179-37/+275
|\ \ \ \ \ | | | | | | | | | | | | [WIP] Smarter pack-building
| * | | | | local: let the packbuilder perform smarter object insertioncmn/pack-objects-walkCarlos Martín Nieto2015-03-111-32/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we use the most naïve and inefficient method for figuring out which objects to send to the remote whereby we end up trying to insert subdirs which have not changed multiple times. Instead, make use of the packbuilder's built-in more efficient method which uses the walk to feed the object list and avoids inserting an object and its descendants.
| * | | | | pack-objects: fill a packbuilder from a walkCarlos Martín Nieto2015-03-112-1/+252
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most use-cases for the object packer communicate in terms of commits which each side has. We already have an object to specify this relationship between commits, namely git_revwalk. By knowing which commits we want to pack and which the other side already has, we can perform similar optimisations to git, by marking each tree as interesting or uninteresting only once, and not sending those trees which we know the other side has.
| * | | | | Reorder some khash declarationsCarlos Martín Nieto2015-03-117-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Keep the definitions in the headers, while putting the declarations in the C files. Putting the function definitions in headers causes them to be duplicated if you include two headers with them.
* | | | | | Merge pull request #2982 from libgit2/cmn/stream-check-ecEdward Thomson2015-03-172-1/+7
|\ \ \ \ \ \ | | | | | | | | | | | | | | Don't ask for a stream's certificate unless it's encrypted