Edward Thomson
ad62f2eedc
update example to new packfile creation signature
2013-11-07 12:00:43 -06:00
Ben Straub
ea8ce3d17e
Fix warnings
2013-11-04 15:50:33 -08:00
Vicent Martí
567649f2ad
Merge pull request #1916 from libgit2/simplify-examples
...
Fix examples to make the important stuff more obvious
2013-11-01 09:38:34 -07:00
Ben Straub
4f62d55968
Fix typos
2013-11-01 05:39:21 -07:00
Carlos Martín Nieto
c44820c616
A few formatting changes for rocco
...
I'm not too happy about manually inserting < and > but those get
output as html tags otherwise.
2013-11-01 09:08:22 +01:00
Carlos Martín Nieto
a6154f2183
indexer: remove the stream infix
...
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.
2013-10-30 15:00:05 +01:00
Vicent Martí
5c50f22a93
Merge pull request #1891 from libgit2/cmn/fix-thin-packs
...
Add support for thin packs
2013-10-28 09:25:44 -07:00
Carlos Martín Nieto
ab46b1d8eb
indexer: include the delta stats
...
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.
2013-10-23 15:08:18 +02:00
Carlos Martín Nieto
ebbd48f00e
examples: show used local objects in fetch
...
Show how many local objects were used to fix the thin pack in our fetch
example.
2013-10-23 14:22:44 +02:00
Carlos Martín Nieto
0b33fca03e
indexer: fix thin packs
...
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.
2013-10-04 15:26:41 +02:00
Carlos Martín Nieto
0e0cf78773
clone: put the callbacks struct directly in the clone options
...
There's no need for this to be a pointer to somewhere else.
2013-10-02 14:04:44 +02:00
Carlos Martín Nieto
e3c131c544
remote: move the credentials callback to the struct
...
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.
2013-10-02 06:41:42 +02:00
Carlos Martín Nieto
d31402a3fc
remote: put the _download() callback with the others
...
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.
2013-10-02 06:41:42 +02:00
Krzysztof Adamski
255836ddac
Adding credentials callback to ls-remote and fetch too.
2013-09-01 19:00:16 +02:00
Krzysztof Adamski
d6d523486c
Removing unneeded code duplication in ls-remote.c
2013-09-01 19:00:16 +02:00
Carlos Martín Nieto
6c1b6b7abc
examples: init the threading system
2013-04-23 16:21:47 +02:00
Russell Belfer
9da187e83d
Fix clang warnings and improve checks
2013-04-09 11:40:00 -07:00
lionel vitte
e2886f1e7e
Fix link issue in network examples
2013-03-20 21:13:43 +08:00
Martin Woodward
5c46937b3a
Give props to Martin Pool
...
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.
2013-02-26 09:00:37 +00:00
Ben Straub
fe95ac1b67
Allow progress callback to cancel fetch
...
This works by having the indexer watch the return
code of the callback, so will only take effect
on object boundaries.
2013-02-05 10:59:58 -08:00
Ben Straub
7602cb7c0e
Add user-from-url param to auth callback
2013-01-31 10:44:57 -08:00
Edward Thomson
c27e211219
update examples to work on windows
2013-01-23 17:38:00 -06:00
Sebastian Bauer
cea994b902
Don't call pthread_exit() in the callback.
...
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.
2013-01-10 12:39:17 +01:00
Ben Straub
730df6d0f7
Include checkout options inline
2013-01-02 13:43:54 -08:00
Ben Straub
0642c1431e
Move url
to last place in parameter list
2013-01-02 12:44:47 -08:00
Ben Straub
3de2256708
Fix warnings in example
2012-12-27 11:12:14 -08:00
Ben Straub
69d1bd9125
Fix examples
2012-12-21 15:30:46 -08:00
Ben Straub
29f27599ea
Rename remote creation APIs
...
git_remote_add -> git_remote_create
git_remote_new -> git_remote_create_inmemory
2012-12-20 10:52:57 -08:00
Ben Straub
316bca697f
Fix clone sample
2012-12-19 17:07:12 -08:00
Ben Straub
cc3e9b5af4
Make building samples more friendly
2012-12-16 10:50:10 -08:00
Ben Straub
b9e7e2b4e1
Move non-options back out of options struct
2012-12-14 13:46:45 -08:00
Ben Straub
0015b5875e
Deploy git_clone_options to network sample
2012-12-14 13:18:06 -08:00
Ben Straub
2b10a2b0e8
Enable authenticated clones in network sample
2012-12-13 11:47:14 -08:00
Ben Straub
24393ea6d3
Stop premature remote freeing when cloning
2012-12-13 09:14:56 -08:00
Ben Straub
34c8c75433
Fix network example
2012-12-13 08:54:23 -08:00
Ben Straub
9267ff586f
Deploy GIT_REMOTE_CALLBACKS_INIT
2012-11-30 13:12:15 -08:00
Ben Straub
b81aa2f1de
Deploy GIT_CHECKOUT_OPTS_INIT
2012-11-30 13:12:14 -08:00
Ben Straub
df705148ec
API updates for remote.h
...
Includes typedef for git_direction, and renames for
GIT_DIR_[FETCH|PUSH] to GIT_DIRECTION_(\1).
2012-11-27 13:19:49 -08:00
Ben Straub
3f63cc9e6d
Examples: fix clone api
2012-11-27 13:18:28 -08:00
Russell Belfer
0f3def715d
Fix various cross-platform build issues
...
This fixes a number of warnings and problems with cross-platform
builds. Among other things, it's not safe to name a member of a
structure "strcmp" because that may be #defined.
2012-11-09 13:52:07 -08:00
Ben Straub
1e3b8ed5cf
Remove 'bytes' param from git_remote_download
2012-10-24 14:07:07 -07:00
Ben Straub
9762ad993d
Renaming: fix example
2012-10-24 13:43:23 -07:00
Ben Straub
7d222e1312
Network progress: rename things
...
git_indexer_stats and friends -> git_transfer_progress*
Also made git_transfer_progress members more sanely
named.
2012-10-24 13:29:14 -07:00
Ben Straub
2dae54a941
Improve clone sample's formatting
2012-10-19 20:24:15 -07:00
Ben Straub
9c05c17b7a
Checkout progress now reports completed/total steps
2012-10-19 20:05:18 -07:00
Ben Straub
7bcd9e23e8
gitno_buffer: callback on each packet
...
The fetch code takes advantage of this to implement a
progress callback every 100kb of transfer.
2012-10-19 19:36:23 -07:00
Ben Straub
45b60d7b8d
Correct progress reporting from checkout
2012-10-19 19:36:22 -07:00
Ben Straub
aa1e86741d
Clone: in-line callbacks for progress
...
Also implemented in the git2 example.
2012-10-19 19:36:22 -07:00
Ben Straub
7635a1188a
Fix example compilation
2012-10-19 19:36:22 -07:00
Ben Straub
2b7efe0340
Example: compile fixes (not yet working)
2012-10-19 19:36:22 -07:00