| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Skip it before we attempt to clone, as we would exit with -1 on systems
which do not have sshd running.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
The user may have the data hashed as MD5 or SHA-1, so we should provide
both types for consumption.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
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.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
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.
|
| |\ \ \ \ \ \ |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Test that the certificate check callback gets the right fingerprint from
the host we're connecting to.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
On successful connection, still ask the user whether they accept the server's certificate, indicating that WinHTTP would let it though.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Returning 0 lets the certificate check succeed. An error code is bubbled
up to the user.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
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.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
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.
|
| | | | | | | | |
|
| | |_|_|_|_|/
| |/| | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
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.
|
| | | | | | | |
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
No files merged may result in bogus merge conflict error
|
| | |_|/ / / /
| |/| | | | |
| | | | | | |
| | | | | | | |
merged, and untracked files exist in the workdir.
|
| |_|/ / / /
|/| | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
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 `""`.
|
|\ \ \ \ \ \
| |/ / / / /
|/| | | | | |
When auto follow tags, FETCH_HEAD should list only newly followed tags
|
| |/ / / / |
|
| |/ / /
|/| | |
| | | |
| | | |
| | | |
| | | | |
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.
|
|\ \ \ \
| | | | |
| | | | | |
Restrict which refs can be the default branch
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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`.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
When cloning, we may be asking for a particular branch or subset of
branches. Make sure we test for that.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Add tests for the case when there are no branches on the remote and when
HEAD is detached but has the id of a non-branch. In both of these cases,
we should return ENOTFOUND.
|
| |/ / /
| | | |
| | | |
| | | | |
Assert what we already do, so as to notice changes.
|
|\ \ \ \
| | | | |
| | | | | |
Clean up transport lookup
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Instead of using ifdefs to run the tests, use them to set when we expect
to support a particular scheme and always have the tests in the code.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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.
|
| | | | | |
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
Skip SSH clone tests if libgit2 not built with GIT_SSH defined
|
| |/ / / |
|
| | | | |
|
|\ \ \ \
| |/ / /
|/| | | |
merge: expose multiple merge bases
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
|
|\ \ \ \
| | | | |
| | | | | |
Fix ahead-behind results
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The logic was reversed. I have checked manually each pair with git and
adjusted the expectation to what git status prints.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
winhttp: Prevent swallowing of url parsing error
|
| | | | | | |
|
|\ \ \ \ \ \
| |/ / / / /
|/| | | | | |
Allow to override default ssh transport_cb - in order to allow third party ssh transports
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Signed-off-by: Sven Strickroth <email@cs-ware.de>
|
| | | | | | |
|
|\ \ \ \ \ \ |
|
| |\ \ \ \ \ \
| | |_|/ / / /
| |/| | | | | |
Fix bugs with negative ignores inside an ignored parent directory
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
`git help ignore` has this to say about trailing slashes:
> If the pattern ends with a slash, it is removed for the purpose of
> the following description, but it would only find a match with a
> directory. In other words, foo/ will match a directory foo and
> paths underneath it, but will not match a regular file or a
> symbolic link foo (this is consistent with the way how pathspec
> works in general in Git).
Sure enough, having manually performed the same steps as this test,
`git status` tells us the following:
# On branch master
#
# Initial commit
#
# Changes to be committed:
# (use "git rm --cached <file>..." to unstage)
#
# new file: force.txt
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# ../.gitignore
# child1/
# child2/
i.e. neither child1 nor child2 is ignored.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
When writing 'bin/*' in the rules, this means we ignore very file inside
bin/ individually, but do not ignore the directory itself. Thus the
status listing should list both files under bin/, one untracked and one
ignored.
|
| |\ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Allow mkdir helper to skip parent errors
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
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.
|
| |\ \ \ \ \ \ \
| | |/ / / / / /
| |/| | | | | | |
Check if the refspec matches before transforming
|
| | | |/ / / /
| | |/| | | | |
|