src


Log

Author Commit Date CI Message
Edward Thomson f54d8d52 2014-10-10T11:28:58 Merge pull request #2574 from csware/hostname-for-certificate_check_cb Provide host name to certificate_check_cb
Edward Thomson 533da4ea 2014-10-10T10:03:06 Merge pull request #2473 from arthurschreiber/arthur/new-javascript-test-files New test files for the javascript diff driver.
Edward Thomson f339f441 2014-10-10T09:59:26 Merge pull request #2603 from libgit2/cmn/revwalk-merge-base Walk only as far as the common ancestors of uninteresting commits
Arthur Schreiber 8e398e4c 2014-10-10T13:17:53 Treat an empty list of refspecs the same as a NULL value.
Carlos Martín Nieto 46a2b8e8 2014-10-09T22:24:40 Merge pull request #2592 from libgit2/cmn/describe Implement git-describe
Arthur Schreiber 994a3006 2014-10-09T22:21:34 Update the javascript diff driver's function pattern.
Anurag Gupta (OSG) 5623e627 2014-10-09T11:44:05 git_filter: dup the filter name
Edward Thomson dfff1b5b 2014-10-09T12:16:17 Merge pull request #2599 from linquize/config-trailing-spaces config: Handle multiple spaces that follow a configuration value and precede a comment char
Edward Thomson 8371457c 2014-10-09T11:32:26 Merge pull request #2597 from ethomson/fixup Trivial fixups
Carlos Martín Nieto eecc1772 2014-10-09T17:02:11 Fix an uninitialized variable
Edward Thomson 10cf4b26 2014-10-09T10:49:37 Merge pull request #2448 from libgit2/cmn/reference-transaction Introduce reference transactions
Edward Thomson 8be28acf 2014-10-09T10:41:38 Merge pull request #2462 from libgit2/cmn/remote-fetch-refs Implement opportunistic ref updates
Carlos Martín Nieto c327d5db 2014-10-09T16:29:30 transaction: rename lock() to lock_ref() This leaves space for future expansion to locking other resources without having to change the API for references.
Arthur Schreiber 917f85a1 2014-10-09T14:16:10 Extract shared functionality.
Arthur Schreiber eca07bcd 2014-10-09T13:58:23 Add git_merge_bases_many.
Carlos Martín Nieto d6afda62 2014-10-08T17:17:31 revwalk: clear first-parent flag on reset This should have been included when implementing the feature but was missed.
Carlos Martín Nieto 9b5d6cea 2014-10-08T17:14:48 revwalk: catch no-push and no-hide cases If there have been no pushes, we can immediately return ITEROVER. If there have been no hides, we must not run the uninteresting pre-mark phase, as we do not want to hide anything and this would simply cause us to spend time loading objects.
Carlos Martín Nieto e7970576 2014-10-08T15:52:11 revwalk: mark uninteresting only up to the common ancestors This introduces a phase at the start of preparing a walk which pre-marks uninteresting commits, but only up to the common ancestors. We do this in a similar way to git, by walking down the history and marking (which is what we used to do), but we keep a time-sorted priority queue of commits and stop marking as soon as there are only uninteresting commits in this queue. This is a similar rule to the one used to find the merge-base. As we keep inserting commits regardless of the uninteresting bit, if there are only uninteresting commits in the queue, it means we've run out of interesting commits in our walk, so we can stop. The old mark_unintesting() logic is still in place, but that stops walking if it finds an already-uninteresting commit, so it will stop on the ones we've pre-marked; but keeping it allows us to also hide those that are hidden via the callback.
Carlos Martín Nieto ad66bf88 2014-10-08T10:45:47 revwalk: keep a single list of user inputs The old separation was due to the old merge-base finding, so it's no longer necessary.
Carlos Martín Nieto 42835aa6 2014-10-08T10:24:06 revwalk: clear the flags on reset These store merge-base information which is only valid for a single run.
Linquize 0a641647 2014-10-04T23:27:06 config: Fix multiple trailing spaces before comments not completely trimmed
Edward Thomson 7c9bf891 2014-10-03T19:34:37 repository_head_unborn: clear error when HEAD is unborn
Vicent Marti 737b5051 2014-10-01T12:03:24 hashsig: Export as a `sys` header
Erdur 44802c55 2014-09-30T16:19:24 path: fix invalid access
Carlos Martín Nieto f99ca523 2014-06-30T06:38:45 stash: use a transaction to modify the reflog The stash is implemented as the refs/stash reference and its reflog. In order to modify the reflog, we need avoid races by making sure we're the only ones allowed to modify the reflog. We achieve this via the transactions API. Locking the reference gives us exclusive write access, letting us modify and write it without races.
Carlos Martín Nieto ab8d9242 2014-06-28T06:39:38 Introduce reference transactions A transaction allows you to lock multiple references and set up changes for them before applying the changes all at once (or as close as the backend supports). This can be used for replication purposes, or for making sure some operations run when the reference is locked and thus cannot be changed.
Carlos Martín Nieto bdeb8772 2014-06-28T07:29:46 signature: add a dup function which takes a pool This will be used by the transaction code.
Carlos Martín Nieto 20363d58 2014-06-28T07:26:33 reflog: constify byindex
Carlos Martín Nieto c5837cad 2014-07-04T09:03:33 remote: implement opportunistic remote-tracking branch updates When a list of refspecs is passed to fetch (what git would consider refspec passed on the command-line), we not only need to perform the updates described in that refspec, but also update the remote-tracking branch of the fetched remote heads according to the remote's configured refspecs. These "fetches" are not however to be written to FETCH_HEAD as they would be duplicate data, and it's not what the user asked for.
Carlos Martín Nieto 2cdd5c57 2014-07-03T07:56:31 remote: store passive refspecs The configured/base fetch refspecs need to be taken into account in order to implement opportunistic remote-tracking branch updates. DWIM them and store them in the struct, but don't do anything with them yet.
Carlos Martín Nieto c300d84a 2014-07-03T07:54:26 remote: don't DWIM refspecs unnecessarily We can only DWIM when we've connected to the remote and have the list of the remote's references. Adding or setting the refspecs should not trigger an attempt to DWIM the refspecs as we typically cannot do it, and even if we did, we would not use them for the current fetch.
Carlos Martín Nieto 3f894205 2014-06-06T15:01:45 remote: allow overriding the refspecs for download and fetch With opportunistic ref updates, git has introduced the concept of having base refspecs *and* refspecs that are active for a particular fetch. Let's start by letting the user override the refspecs for download.
Carlos Martín Nieto 886710b7 2014-09-30T09:20:08 describe: make mingw happy The MinGW compiler does not like it when we declare a typedef twice.
Carlos Martín Nieto 25345c0c 2014-09-30T09:18:22 describe: rename git_describe_opts to git_describe_options And implement the option init functions for this and the format options.
Carlos Martín Nieto 55f1b6b6 2014-09-30T08:56:27 describe: implement abbreviated ids
Carlos Martín Nieto fd8126e4 2014-09-30T08:54:52 describe: implement describing the workdir When we describe the workdir, we perform a describe on HEAD and then check to see if the worktree is dirty. If it is and we have a suffix string, we append that to the buffer.
Carlos Martín Nieto 3b6534b8 2014-09-30T07:19:14 describe: split into gather and format steps Instead of printing out to the buffer inside the information-gathering phase, write the data to a intermediate result structure. This allows us to split the options into gathering options and formatting options, simplifying the gathering code.
Carlos Martín Nieto 1f501a08 2014-09-30T04:58:02 describe: rename _object() to _commit() We don't describe arbitrary object, so let's give it the name of the one object type we accept.
Carlos Martín Nieto af6cc38f 2014-09-30T04:38:05 Merge remote-tracking branch 'upstream/master' into cmn/describe
Edward Thomson 4c534892 2014-09-29T14:57:54 Merge pull request #2581 from jacquesg/stash-ignored-directories Stash ignored directories
Edward Thomson 89602a1a 2014-09-29T10:39:40 Merge pull request #2584 from jacquesg/pool-alignment Pool/Index data is not aligned
Edward Thomson ffe34a7c 2014-09-29T10:37:37 Merge pull request #2582 from swansontec/master Correctly handle getaddrinfo return result
Edward Thomson ced843f4 2014-09-29T10:29:00 Merge pull request #2559 from libgit2/cmn/free-tls-error global: free the error message when exiting a thread
Jacques Germishuys 7b7aa75f 2014-09-24T13:24:39 Recurse ignored directories when stashing
Jacques Germishuys 5387cfee 2014-09-25T15:29:35 Ensure patch is initialized to zero, otherwise, the allocated flag may be set
Jacques Germishuys e640a77c 2014-09-25T15:29:03 Silence uninitialized warning
Jacques Germishuys ff97778a 2014-09-25T13:07:36 The raw index buffer content is not guaranteed to be aligned * Ensure alignment by copying the content into a structure on the stack
Jacques Germishuys ad8c8d93 2014-09-25T12:05:48 Ensure pool data is aligned on an 8 byte boundary
Jacques Germishuys 3aaa5c7b 2014-09-25T12:05:26 Introduce GIT_ALIGN
William Swanson d0cf1040 2014-09-24T12:01:14 Correctly handle getaddrinfo return result The getaddrinfo function indicates failure with a non-zero return code, but this code is not necessarily negative. On platforms like Android where the code is positive, a failed call causes libgit2 to segfault.
Sven Strickroth e6e834a1 2014-09-18T12:23:07 Provide host name to certificate_check_cb Signed-off-by: Sven Strickroth <email@cs-ware.de>
Vicent Marti 14556cbf 2014-09-17T17:13:25 Merge pull request #2567 from cirosantilli/factor-41 Factor 40 and 41 constants from source.
Vicent Marti 276d9ea3 2014-09-17T15:39:57 Merge pull request #2571 from libgit2/vmg/walk-up-path Fix `git_path_walk_up` to work with non-rooted paths
The rugged tests are fragile 74240afb 2014-09-17T15:35:50 repository: Do not double-free config
Vicent Marti 4592b62e 2014-09-17T15:26:48 Merge pull request #2572 from cirosantilli/factor-void Replace void casts with GIT_UNUSED.
The rugged tests are fragile 4e964117 2014-09-17T15:24:56 Style
The rugged tests are fragile a2b4407d 2014-09-17T15:23:17 attr: Do not walk path if we're at the root
Ciro Santilli c5cf8cad 2014-09-17T15:19:08 Replace void casts with GIT_UNUSED.
The rugged tests are fragile bbb988a5 2014-09-17T14:52:31 path: Fix `git_path_walk_up` to work with non-rooted paths
Vicent Marti 1312f87b 2014-09-17T14:56:39 Merge pull request #2464 from libgit2/cmn/host-cert-info Provide a callback for certificate validation
Carlos Martín Nieto 25abbc27 2014-09-17T03:19:40 Clean up some leaks in the test suite
Carlos Martín Nieto 4fe5b771 2014-09-16T13:35:36 winhttp: get rid of the cert ignore flag This brings us back in line with the other transports.
Carlos Martín Nieto 1e0aa105 2014-09-16T03:22:09 ssh: expose both hashes The user may have the data hashed as MD5 or SHA-1, so we should provide both types for consumption.
Carlos Martín Nieto 286369a8 2014-09-16T02:27:16 ssh: provide our own types for host key lengths Instead of using the libssh2 defines, provide our own, which eases usage as we do not need to check whether libgit2 was built with libssh2 or not.
Carlos Martín Nieto 0782fc43 2014-09-16T01:47:30 net: use only structs to pass information about cert Instead of spreading the data in function arguments, some of which aren't used for ssh and having a struct only for ssh, use a struct for both, using a common parent to pass to the callback.
Carlos Martín Nieto 0fef3899 2014-09-16T01:25:53 Merge remote-tracking branch 'upstream/master' into cmn/host-cert-info
Carlos Martín Nieto 41698f22 2014-09-11T10:04:05 net: remove support for outright ignoring certificates This option make it easy to ignore anything about the server we're connecting to, which is bad security practice. This was necessary as we didn't use to expose detailed information about the certificate, but now that we do, we should get rid of this. If the user wants to ignore everything, they can still provide a callback which ignores all the information passed.
Carlos Martín Nieto 7c8acc54 2014-08-30T14:26:57 winhttp: set ignore security flags on user command If the user returns 0 from the certificate check and we had certificate issues, set the options to ignore certificate errors and resend the request.
Carlos Martín Nieto 67c84e06 2014-08-30T14:04:57 winhttp: bring together request sending We need to call WinHttpSendRequest() in three different places. Unify all in a single function to have a single place for the certificate check.
Carlos Martín Nieto 5f2cf732 2014-08-30T13:12:33 winhttp: only do certificate check for SSL If we're not using SSL, don't call the user's certificate check callback.
Carlos Martín Nieto 08545d36 2014-08-30T00:40:37 winhttp: credential check on successful connect On successful connection, still ask the user whether they accept the server's certificate, indicating that WinHTTP would let it though.
Carlos Martín Nieto 23ca0ad5 2014-08-29T21:25:13 Bring certificate check back to the normal return code Returning 0 lets the certificate check succeed. An error code is bubbled up to the user.
Carlos Martín Nieto 2f5864c5 2014-08-29T21:15:36 ssh: do ssh cert info before asking for credentials We know the host's key as soon as we connect, so we should perform the check as soon as we can, before we bother with the user's credentials.
Carlos Martín Nieto 17491f6e 2014-08-29T17:18:23 transport: always call the certificate check callback We should let the user decide whether to cancel the connection or not regardless of whether our checks have decided that the certificate is fine. We provide our own assessment to the callback to let the user fall back to our checks if they so desire.
Carlos Martín Nieto ec1ce458 2014-08-10T17:06:53 http: send the DER-encoded cert to the callback Instead of the parsed data, we can ask OpenSSL to give us the DER-encoded version of the certificate, which the user can then parse and validate.
Carlos Martín Nieto 9b940586 2014-07-04T12:45:43 Provide a callback for certificate validation If the certificate validation fails (or always in the case of ssh), let the user decide whether to allow the connection. The data structure passed to the user is the native certificate information from the underlying implementation, namely OpenSSL or WinHTTP.
Vicent Marti 903a7616 2014-09-16T13:22:40 Merge pull request #2561 from jacquesg/merge-skip No files merged may result in bogus merge conflict error
The rugged tests are fragile 52e9120c 2014-09-16T13:20:58 attr: Cleanup the containing dir logic
Ciro Santilli 3b2cb2c9 2014-09-16T11:49:25 Factor 40 and 41 constants from source.
Russell Belfer 1fbeb2f0 2014-09-15T21:59:23 Fix attribute lookup in index for bare repos When using a bare repo with an index, libgit2 attempts to read files from the index. It caches those files based on the path to the file, specifically the path to the directory that contains the file. If there is no working directory, we use `git_path_dirname_r` to get the path to the containing directory. However, for the `.gitattributes` file in the root of the repository, this ends up normalizing the containing path to `"."` instead of the empty string and the lookup the `.gitattributes` data fails. This adds a test of attribute lookups on bare repos and also fixes the problem by simply rewriting `"."` to be `""`.
Vicent Marti a7fcac13 2014-09-15T20:26:12 Merge pull request #2554 from linquize/fetch-head-tag When auto follow tags, FETCH_HEAD should list only newly followed tags
Carlos Martín Nieto fdea219a 2014-09-10T18:28:19 global: free the error message when exiting a thread When we free the global state at thread termination, we must also free the error message in order not to leak the string once per thread.
Jacques Germishuys dc68ee8d 2014-09-12T22:37:15 Remove local unused index_repo variable
Jacques Germishuys a565f364 2014-09-12T22:53:56 Only check for workdir conflicts if the index has merged files Passing 0 as the length of the paths to check to git_diff_index_to_workdir results in all files being treated as conflicting, that is, all untracked or modified files in the worktree is reported as conflicting
Carlos Martín Nieto 76e3c43f 2014-09-10T18:13:34 signature: don't allow empty emails A signature is made up of a non-empty name and a non-empty email so let's validate that. This also brings us more in line with git, which also rejects ident with an empty email.
Vicent Marti 31e752b6 2014-09-09T12:52:36 Merge pull request #2511 from libgit2/cmn/remote-default-restrict Restrict which refs can be the default branch
Linquize d908351a 2014-09-05T22:31:53 When auto follow tags, FETCH_HEAD should list only newly followed tags
Vicent Marti 1e71354e 2014-09-05T03:24:43 reflog: Error handling on empty reflog
Carlos Martín Nieto 2dc399a8 2014-09-04T16:46:14 ssh: store error message immediately after a failed agent call When the call to the agent fails, we must retrieve the error message just after the function call, as other calls may overwrite it. As the agent authentication is the only one which has a teardown and there does not seem to be a way to get the error message from a stored error number, this tries to introduce some small changes to store the error from the agent. Clearing the error at the beginning of the loop lets us know whether the agent has already set the libgit2 error message and we should skip it, or if we should set it.
Vicent Marti 89e05e2a 2014-09-03T12:50:44 Merge pull request #2543 from libgit2/cmn/known-transports Clean up transport lookup
Vicent Marti 4c958046 2014-09-03T12:19:48 Merge pull request #2530 from libgit2/jamill/relative_gitlink Teach repository to use relative paths for git symbolic links
Jameson Miller bc737620 2014-08-20T10:24:41 Introduce option to use relative paths for repository work directory 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.
Edward Thomson 0ee9f31c 2014-08-20T10:23:39 Introduce git_path_make_relative
Arkady Shapkin 5cd81bb3 2014-09-03T01:01:25 Several CppCat warnings fixed
Carlos Martín Nieto 15c30b72 2014-09-02T13:23:54 clone: handle overly restrictive refspecs When the fetch refspec does not include the remote's default branch, it indicates an error in user expectations or programmer error. Error out in that case. This lets us get rid of the dummy refspec which can never work as its zeroed out. In the cases where we did not find a default branch, we set HEAD detached immediately, which lets us refactor the "normal" path, removing `found_branch`.
Carlos Martín Nieto e128a1af 2014-09-02T13:10:19 clone: correct handling of an unborn HEAD If the remote does not advertise HEAD, then it is unborn and we cannot checkout that branch. Handle it the same way as an empty repo.
Carlos Martín Nieto ba67c075 2014-08-31T17:16:40 remote: get rid of git_remote_valid_url() 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.
Carlos Martín Nieto bd3854a0 2014-08-31T17:12:45 transport: return ENOTFOUND for HTTPS and SSH when they're not supported 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.
Carlos Martín Nieto dbc77850 2014-08-31T16:48:41 transport: distinguish between unknown and unsupported transports 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.
Vicent Marti 46a13f32 2014-08-29T18:19:56 Merge pull request #2481 from libgit2/cmn/oidarray merge: expose multiple merge bases