| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
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.
|
|\
| |
| | |
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
|
| | | |/ /
| | |/| | |
|
| |\ \ \ \
| | | | | |
| | | | | | |
Export `git_oid_tostr_s` instead of `_allocfmt`
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
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.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This reverts commit 0dc54e149498bbd5de5e5ecc6006f9f5afb6588c.
|
| | |/ / /
| |/| | |
| | | | |
| | | | | |
We don't really use this at all, and it breaks packaging in Windows.
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
Decode base64-encoded text into a git_buf
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The online::push::notes test pushes a note but leaves it hanging
around for other tests to stumble across when they're validating
that they're seeing the refs they expect to see. Clean it up on
exit.
|
| | | | | |
|
| |\ \ \ \
| | | | | |
| | | | | | |
Custom transport: minor cleanups
|
| | |/ / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
* 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://").
|
| |/ / / |
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | | |
Git skips entries in directories that are not S_ISDIR, S_ISREG, or
S_ISLNK, so let's make libgit2 do the same thing.
|
| |\ \
| | | |
| | | | |
Compatibility/Portability cleanup
|
| | | | |
|
| |\ \ \
| | | | |
| | | | | |
Fix git status list new unreadable folder
|