summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | Merge pull request #2543 from libgit2/cmn/known-transportsVicent Marti2014-09-031-32/+4
|\ \ \ \ \ \ | | | | | | | | | | | | | | Clean up transport lookup
| * | | | | | remote: get rid of git_remote_valid_url()Carlos Martín Nieto2014-08-311-13/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It does the same as git_remote_supported_url() but has a name which implies we'd check the URL for correctness while we're simply looking at the scheme and looking it up in our lists. While here, fix up the tests so we check all the combination of what's supported.
| * | | | | | transport: return ENOTFOUND for HTTPS and SSH when they're not supportedCarlos Martín Nieto2014-08-311-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous commit makes it harder to figure out if the library was built with support for a particular transport. Roll back some of the changes and remove ssh:// and https:// from the list if we're being built without support for them.
| * | | | | | transport: distinguish between unknown and unsupported transportsCarlos Martín Nieto2014-08-311-24/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even when built without a SSH support, we know about this transport. It is implemented, but the current code makes us return an error message saying it's not. This is a leftover from the initial implementation of the transports when there were in fact transports we knew about but were not implemented. Instead, let the SSH transport itself say it cannot run, the same as we do for HTTPS.
* | | | | | | Merge pull request #2530 from libgit2/jamill/relative_gitlinkVicent Marti2014-09-034-41/+163
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Teach repository to use relative paths for git symbolic links
| * | | | | | | Introduce option to use relative paths for repository work directoryjamill/relative_gitlinkJameson Miller2014-09-022-41/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Teach git_repository_init_ext to use relative paths for the gitlink to the work directory. This is used when creating a sub repository where the sub repository resides in the parent repository's .git directory.
| * | | | | | | Introduce git_path_make_relativeEdward Thomson2014-09-022-0/+66
| |/ / / / / /
* | | | | | | Several CppCat warnings fixedArkady Shapkin2014-09-034-6/+3
|/ / / / / /
* | | | | | Merge pull request #2481 from libgit2/cmn/oidarrayVicent Marti2014-08-293-1/+92
|\ \ \ \ \ \ | |/ / / / / |/| | | | | merge: expose multiple merge bases
| * | | | | merge: expose multiple merge basescmn/oidarrayCarlos Martín Nieto2014-07-273-1/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We always calculate multiple merge bases, but up to now we had only exposed the "best" merge base. Introduce git_oidarray which analogously to git_strarray lets us return multiple ids.
* | | | | | Merge pull request #2539 from libgit2/cmn/ahead-behind-orderVicent Marti2014-08-281-2/+2
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fix ahead-behind results
| * | | | | | graph: fix ahead-behind logiccmn/ahead-behind-orderCarlos Martín Nieto2014-08-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we see PARENT1, it means there is a local commit and thus we are ahead. Likewise, seeing PARENT2 means that the upstream branch has a commit and we are one more behind. The logic is currently reversed. Correct it. This fixes #2501.
* | | | | | | Merge pull request #2538 from libgit2/ntk/propagate_url_parsing_errorVicent Marti2014-08-271-3/+3
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | winhttp: Prevent swallowing of url parsing error
| * | | | | | | winhttp: Prevent swallowing of url parsing errornulltoken2014-08-271-3/+3
| | | | | | | |
* | | | | | | | Merge pull request #2502 from rnowosielski/remote_set_timeoutVicent Marti2014-08-271-1/+17
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Set timeout on remote (Add timeout for WinHttpReceiveResponse #2147)
| * | | | | | | | Set timeout on remote (WinHTTP) should return error in case of failure. ↵Rafal Nowosielski2014-08-271-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Connection timeout set to 1 minute. Read/Write timeout remains set to infinite #2147
| * | | | | | | | Set timeout on remote (WinHTTP) to infinite #2147Rafal Nowosielski2014-08-231-0/+8
| | | | | | | | |
* | | | | | | | | Merge pull request #2490 from csware/ssh-wintunnelVicent Marti2014-08-271-20/+26
|\ \ \ \ \ \ \ \ \ | |_|/ / / / / / / |/| | | | | | | | Allow to override default ssh transport_cb - in order to allow third party ssh transports
| * | | | | | | | Allow to override default ssh transport_cbSven Strickroth2014-08-261-20/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | W/o this patch it is not possible to have a third party ssh transport_cb if GIT_SSH is disabled or a third party transport_cb which has a higher priority than the default one. Signed-off-by: Sven Strickroth <email@cs-ware.de>
* | | | | | | | | Merge remote-tracking branch 'upstream/master' into cmn/ssh-retryCarlos Martín Nieto2014-08-2770-756/+1895
|\ \ \ \ \ \ \ \ \
| * | | | | | | | | Refactor git_cache to use an rwlockJustin Spahr-Summers2014-08-262-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This significantly reduces contention when many threads are trying to read from the cache simultaneously.
| * | | | | | | | | Merge pull request #2508 from libgit2/rb/fix-ignore-slash-starVicent Marti2014-08-262-1/+22
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Fix bugs with negative ignores inside an ignored parent directory
| | * | | | | | | | | For negative matches, always use leading dir matchRussell Belfer2014-08-081-1/+2
| | | | | | | | | | |
| | * | | | | | | | | Fix rejection of parent dir of negated ignoresRussell Belfer2014-08-082-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While scanning through a directory hierarchy, this prevents a positive ignore match on a parent directory from blocking the scan of a directory when a negative match rule exists for files inside the directory.
| * | | | | | | | | | pack: return the correct final offsetcmn/unpack-offsetCarlos Martín Nieto2014-08-261-1/+1
| | |_|_|/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The callers of git_packfile_unpack() expect the obj_offset argument to be set to the beginning of the next object. We were mistakenly returning the the offset of the object's data, which causes the CRC function to try to use the wrong offset. Set obj_offset to curpos instead of elem->offset to point to the next element and bring back expected behaviour.
| * | | | | | | | | Merge pull request #2532 from arthurschreiber/arthur/fix-merge-base-commit-checkVicent Marti2014-08-251-1/+4
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | merge base: Correctly raise an error if a non-commit object is passed.
| | * | | | | | | | | merge base: Correctly raise an error if a non-commit object is passed.Arthur Schreiber2014-08-251-1/+4
| | | |_|/ / / / / / | | |/| | | | | | |
| * | | | | | | | | Merge pull request #2531 from libgit2/rb/mkdir-allow-parent-failuresVicent Marti2014-08-251-3/+5
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Allow mkdir helper to skip parent errors
| | * | | | | | | | | Allow mkdir helper to skip parent errorsrb/mkdir-allow-parent-failuresRussell Belfer2014-08-221-3/+5
| | |/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our mkdir helper was failing is a parent directory was not accessible even if the child directory could be created. This changes the helper to keep trying child directories even when the parent is unwritable.
| * | | | | | | | | Merge pull request #2527 from jacquesg/refspec-crashVicent Marti2014-08-251-2/+14
| |\ \ \ \ \ \ \ \ \ | | |/ / / / / / / / | |/| | | | | | | | Check if the refspec matches before transforming
| | * | | | | | | | Check that the refspec matches before modifying the out bufferJacques Germishuys2014-08-211-6/+6
| | | | | | | | | |
| | * | | | | | | | Check if the refspec matches before transformingJacques Germishuys2014-08-171-2/+14
| | | |/ / / / / / | | |/| | | | | |
| * | | | | | | | Merge pull request #2528 from libgit2/vmg/tostr_sVicent Marti2014-08-183-0/+20
| |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Export `git_oid_tostr_s` instead of `_allocfmt`
| | * | | | | | | | oid: Export `git_oid_tostr_s` instead of `_allocfmt`vmg/tostr_sVicent Marti2014-08-183-0/+20
| | | |_|_|_|_|/ / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old `allocfmt` is of no use to callers, as they are not able to free the returned buffer. Export a new API that returns a static string that doesn't need to be freed.
| * | | | | | | | http: make sure we can consume the data we requestcmn/http-recv-bufferCarlos Martín Nieto2014-08-161-4/+20
| | |/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The recv buffer (parse_buffer) and the buffer have independent sizes and offsets. We try to fill in parse_buffer as much as possible before passing it to the http parser. This is fine most of the time, but fails us when the buffer is almost full. In those situations, parse_buffer can have more data than we would be able to put into the buffer (which may be getting full if we're towards the end of a data sideband packet). To work around this, we check if the space we have left on our buffer is smaller than what could come from the network. If this happens, we make parse_buffer think that it has as much space left as our buffer, so it won't try to retrieve more data than we can deal with. As the start of the data may no longer be at the start of the buffer, we need to keep track of where it really starts (data_offset) and use that in our calculations for the real size of the data we received from the network. This fixes #2518.
| * | | | | | | git_remote_ls() should return an error if the transport is not availableJacques Germishuys2014-08-151-0/+7
| | | | | | | |
| * | | | | | | Introduce proper http authentication APIEdward Thomson2014-08-155-282/+528
| | | | | | | |
| * | | | | | | Add GSSAPI support for SPNEGO/Kerberos auth over HTTPEdward Thomson2014-08-151-30/+287
| | | | | | | |
| * | | | | | | Introduce git_buf_decode_base64Edward Thomson2014-08-155-15/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Decode base64-encoded text into a git_buf
| * | | | | | | Perform HTTP keep-aliveEdward Thomson2014-08-151-3/+12
| | | | | | | |
| * | | | | | | Custom transport: minor cleanupsEdward Thomson2014-08-144-62/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Move the transport registration mechanisms into a new header under 'sys/' because this is advanced stuff. * Remove the 'priority' argument from the registration as it adds unnecessary complexity. (Since transports cannot decline to operate, only the highest priority transport is ever executed.) Users who require per-priority transports can implement that in their custom transport themselves. * Simplify registration further by taking a scheme (eg "http") instead of a prefix (eg "http://").
| * | | | | | | Allow NULL error message prefix when class=GITERR_OSEdward Thomson2014-08-131-7/+9
| |/ / / / / /
| * | | | | | config: a multiline var can start immediatelyCarlos Martín Nieto2014-08-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the check for multiline, we traverse the backslashes from the end backwards and int the end assert that we haven't gone past the beginning of the line. We make sure of this in the loop condition, but we also check in the return value. However, for certain configurations, a line in a multiline variable might be empty to aid formatting. In that case, 'end' == 'start', since we ended up looking at the first char which made it a multiline. There is no need for the (end > start) check in the return, since the loop guarantees we won't go further back than the first char in the line, and we do accept the first char to be the final backslash. This fixes #2483.
| * | | | | | Merge pull request #2507 from libgit2/rb/timer-typoVicent Marti2014-08-091-3/+3
| |\ \ \ \ \ \ | | |/ / / / / | |/| | | | | Typo in timer constants
| | * | | | | Fix typo in timer normalization constantsrb/timer-typoRussell Belfer2014-08-051-3/+3
| | | |_|/ / | | |/| | | | | | | | | | | | | | | | | | | | | The effect of this would be that various update callbacks would not be made at the correct interval.
| * | | | | Don't report status on named pipesRussell Belfer2014-08-081-11/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Git skips entries in directories that are not S_ISDIR, S_ISREG, or S_ISLNK, so let's make libgit2 do the same thing.
| * | | | | Merge pull request #2471 from jacquesg/compatibility-cleanupVicent Marti2014-08-0711-124/+145
| |\ \ \ \ \ | | |/ / / / | |/| | | | Compatibility/Portability cleanup
| | * | | | Introduce some consistency in definition/declaration orderingJacques Germishuys2014-08-052-17/+17
| | | | | |
| | * | | | Move p_realpath logic to realpath.cJacques Germishuys2014-08-052-14/+9
| | | | | |
| | * | | | Consistently use p_snprintfJacques Germishuys2014-08-053-12/+13
| | | | | |