| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Under normal conditions, git_remote_fetch() should be the only function
used to perform a fetch. Don't let the example lead people astray.
|
| |
|
|
|
|
|
|
| |
An anonymous remote is not configured and cannot therefore have
configured refspecs. Remove the parameter which adds this from the
constructor.
|
|
|
|
|
| |
This lets us see what the server (or libgit2 locally) is doing, rather
than having to stare at a non-moving screen.
|
| |
|
|
|
|
|
| |
Code restructured to better represent best practice when
using libgit2.
|
|
|
| |
Added forgotten call to git_libgit2_shutdown() to the /examples/network/git2.c.
|
|
|
|
|
|
|
|
|
|
| |
The signature for the reflog is not something which changes
dynamically. Almost all uses will be NULL, since we want for the
repository's default identity to be used, making it noise.
In order to allow for changing the identity, we instead provide
git_repository_set_ident() and git_repository_ident() which allow a user
to override the choice of signature.
|
| |
|
|
|
|
|
| |
Local transports don't have data about the size, avoid dividing by
zero in the callback.
|
|
|
|
|
|
| |
This describes their purpose better, as we now initialize ssl and some
other global stuff in there. Calling the init function is not something
which has been optional for a while now.
|
|
|
|
| |
This brings it in line with the rest of the lookup functions.
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The order in this function is the opposite to what
create_with_fetchspec() has, so change this one, as url-then-refspec is
what git does.
As we need to break compilation and the swap doesn't do that, let's take
this opportunity to rename in-memory remotes to anonymous as that's
really what sets them apart.
|
| |
|
|
|
|
|
|
| |
- added MSVC cmake definitions to disable warnings
- general.c is rewritten so it is ansi-c compatible and compiles ok on microsoft windows
- some MSVC reported warning fixes
|
| |
|
|\
| |
| | |
Remote revamp (director's cut)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
|/ |
|
|\
| |
| | |
Fix examples to make the important stuff more obvious
|
| | |
|
| |
| |
| |
| |
| | |
I'm not too happy about manually inserting < and > but those get
output as html tags otherwise.
|
|/
|
|
|
|
|
|
|
|
|
| |
It was there to keep it apart from the one which read in from a file on
disk. This other indexer does not exist anymore, so there is no need for
anything other than git_indexer to refer to it.
While here, rename _add() function to _append() and _finalize() to
_commit(). The former change is cosmetic, while the latter avoids
talking about "finalizing", which OO languages use to mean something
completely different.
|
|\
| |
| | |
Add support for thin packs
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The user is unable to derive the number of deltas in the pack, as that
would require them to capture the stats exactly in the moment between
download and final processing, which is abstracted away in the fetch.
Capture these numbers for the user and expose them in the progress
struct. The clone and fetch examples now also present this information
to the user.
|
| |
| |
| |
| |
| | |
Show how many local objects were used to fix the thin pack in our fetch
example.
|
| |
| |
| |
| |
| |
| | |
When given an ODB from which to read objects, the indexer will attempt
to inject the missing bases at the end of the pack and update the
header and trailer to reflect the new contents.
|
| |
| |
| |
| | |
There's no need for this to be a pointer to somewhere else.
|
| |
| |
| |
| |
| | |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Martin Pool was the original author of the code referenced in the clone
example. Make note that he's given his permission and also give him the
proper credit.
|
|
|
|
|
| |
This works by having the indexer watch the return
code of the callback, so will only take effect
on object boundaries.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Compilers that are not aware that pthread_exit() does not return
issue a warning when compiling the present code. This change
exchanges the call to pthread_exit() with a simple return
statement. According to the pthread specification this is
equivalent.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
git_remote_add -> git_remote_create
git_remote_new -> git_remote_create_inmemory
|
| |
|