Age | Commit message (Collapse) | Author |
|
The callback-based method of listing remote references dates back to the
beginning of the network code's lifetime, when we didn't know any
better.
We need to keep the list around for update_tips() after disconnect() so
let's make use of this to simply give the user a pointer to the array so
they can write straightforward code instead of having to go through a
callback.
|
|
Removing arbitrary refspecs makes things more complex to reason
about. Instead, let the user set the fetch and push refspec list to
whatever they want it to be.
|
|
This hooks up git_path_direach and git_path_dirload so that they
will take a flag indicating if directory entry names should be
tested and converted from decomposed unicode to precomposed form.
This code will only come into play on the Apple platform and even
then, only when certain types of filesystems are used.
This involved adding a flag to these functions which involved
changing a lot of places in the code.
This was an opportunity to do a bit of code cleanup here and there,
for example, getting rid of the git_futils_cleanupdir_r function in
favor of a simple flag to git_futils_rmdir_r to not remove the top
level entry. That ended up adding depth tracking during rmdir_r
which led to a safety check for infinite directory recursion. Yay.
This hasn't actually been tested on the Mac filesystems where the
issue occurs. I still need to get test environment for that.
|
|
There's no need for this to be a pointer to somewhere else.
|
|
This wasremoved as part of the large culling a few commits ago.
|
|
This is a small thing that by itself doesn't quite justify making the
user use clone_into.
|
|
The removal of many options which lead to the direct usage of the
user's checkout options means we should make sure they remain const.
|
|
This used to be done via transport flags, which was removed in a
previous commit.
|
|
The basic clone function is there to make it easy to create a "normal"
clone. Remove a bunch of options that are about changing the remote's
configuration.
|
|
Unify the code bases.
|
|
Downloading all tags is part of what makes it a clone instead of
simply a fetch.
|
|
|
|
This allows you to set up the repository and remote as you which to
have them before performing the clone operation.
|
|
Move this one as well, letting us have a single way of setting the
callbacks for the remote, and removing fields from the clone options.
|
|
The text progress and update_tips callbacks are already part of the
struct, which was meant to unify the callback setup, but the download
one was left out.
|
|
Unfortunately git-core uses the term "unborn branch" and "orphan
branch" interchangeably. However, "orphan" is only really there for
the checkout command, which has the `--orphan` option so it doesn't
actually create the branch.
Branches never have parents, so the distinction of a branch with no
parents is odd to begin with. Crucially, the error messages deal with
unborn branches, so let's use that.
|
|
|
|
|
|
|
|
This is a significant reorganization of the diff code to break it
into a set of more clearly distinct files and to document the new
organization. Hopefully this will make the diff code easier to
understand and to extend.
This adds a new `git_diff_driver` object that looks of diff driver
information from the attributes and the config so that things like
function content in diff headers can be provided. The full driver
spec is not implemented in the commit - this is focused on the
reorganization of the code and putting the driver hooks in place.
This also removes a few #includes from src/repository.h that were
overbroad, but as a result required extra #includes in a variety
of places since including src/repository.h no longer results in
pulling in the whole world.
|
|
Breaking RefDB changes
|
|
Added support for setting transport flags (No check SSL cert) to git_clo...
|
|
|
|
|
|
|
|
|
|
Introduce a refs iterator
|
|
Nobody should ever be using anything other than ALL at this level, so
remove the option altogether.
As part of this, git_reference_foreach_glob is now implemented in the
frontend using an iterator. Backends will later regain the ability of
doing the glob filtering in the backend.
|
|
|
|
Make sure error messages are set for most error returns
|
|
|
|
|
|
|
|
|
|
|
|
Introduce git_remote_{fetch,push}_refspecs() to get a list of refspecs
from the remote and rename the refspec-adding functions to a less
silly name.
Use this instead of the vector index hacks in the tests.
|
|
A remote can have a multitude of refspecs. Up to now our git_remote's
have supported a single one for each fetch and push out of simplicity
to get something working.
Let the remotes and internal code know about multiple remotes and get
the tests passing with them.
Instead of setting a refspec, the external users can clear all and add
refspecs. This should be enough for most uses, though we're still
missing a querying function.
|
|
|
|
Allow network operations to cancel
|
|
|
|
This works by having the indexer watch the return
code of the callback, so will only take effect
on object boundaries.
|
|
Set head detach if can't found branch after download
Signed-off-by: Frank Li <lznuaa@gmail.com>
|
|
|
|
|
|
|
|
|
|
Allow to clone repositories that don't have a `master` branch
|
|
|
|
Before this, we error out from `reference_matches_remote_head` if the
reference we're searching for does not exist.
Since we explicitly check if master is existing in `update_head_to_remote`
and error out if it doesn't, a repository without master branch could
not be cloned.
In fact this was later clobbered by what is fixed in #1194.
However, this patch introduces a `found` member in `head_info` and sets
it accordingly. That also saves us from checking the string length of
`branchname` a few times.
|
|
|