summaryrefslogtreecommitdiff
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* index refactoringEdward Thomson2012-10-292-2/+3
|
* Remove 'bytes' param from git_remote_downloadBen Straub2012-10-241-6/+3
|
* Renaming: fix exampleBen Straub2012-10-243-14/+17
|
* Network progress: rename thingsBen Straub2012-10-241-1/+1
| | | | | | | git_indexer_stats and friends -> git_transfer_progress* Also made git_transfer_progress members more sanely named.
* Improve clone sample's formattingBen Straub2012-10-191-9/+6
|
* Checkout progress now reports completed/total stepsBen Straub2012-10-191-4/+8
|
* gitno_buffer: callback on each packetBen Straub2012-10-191-3/+4
| | | | | The fetch code takes advantage of this to implement a progress callback every 100kb of transfer.
* Correct progress reporting from checkoutBen Straub2012-10-191-3/+3
|
* Clone: in-line callbacks for progressBen Straub2012-10-191-42/+50
| | | | Also implemented in the git2 example.
* Fix example compilationBen Straub2012-10-192-2/+2
|
* Example: compile fixes (not yet working)Ben Straub2012-10-191-3/+2
|
* Add accessor for git_remote's stats fieldBen Straub2012-10-191-9/+8
| | | | Also converted the network example to use it.
* examples: fix config getter param orderCarlos Martín Nieto2012-09-301-2/+2
|
* examples: add progress output to fetchCarlos Martín Nieto2012-08-241-1/+13
|
* indexer: recognize and mark when all of the packfile has been downloadedCarlos Martín Nieto2012-08-241-1/+1
| | | | | We can't always rely on the network telling us when the download is finished. Recognize it from the indexer itself.
* Merge pull request #778 from ben/cloneVicent Martí2012-08-194-0/+71
|\ | | | | Clone
| * Rename example function to avoid name collision.Ben Straub2012-07-313-3/+3
| |
| * Checkout: save index on checkout.Ben Straub2012-07-311-1/+0
| |
| * Add clone to the network example.Ben Straub2012-07-304-0/+72
| |
* | examples: fix warnings in network/Carlos Martín Nieto2012-07-304-46/+24
| |
* | remote: start moving the protocol to a common areaCarlos Martín Nieto2012-07-301-0/+3
|/ | | | | | | For the transition, http is going to keep its own logic until the git/common code catches up with the implied multi_ack that http has. This also has the side-effect of making the code cleaner and more correct regardingt he protocol.
* Add a struct for network callbacksCarlos Martín Nieto2012-07-211-2/+9
| | | | | Currently only update_tips is used, but it prepares the way for progress output during download.
* Updating language in examples READMERussell Belfer2012-07-101-4/+7
|
* examples: add READMEMichael Schubert2012-07-101-0/+8
|
* indexer: don't use '/objects/pack/' unconditionallyCarlos Martín Nieto2012-06-282-2/+2
| | | | | Not everyone who indexes a packfile wants to put it in the standard git repository location.
* Fix incorrect revertChris Young2012-06-141-1/+1
|
* Updates from comments on OS4 compatibility pull request ↵Chris Young2012-06-142-8/+2
| | | | http://github.com/libgit2/libgit2/pull/766
* Merge remote-tracking branch 'source/development' into developmentChris Young2012-06-131-3/+1
|\
| * Minor fixes, cleanups, and clarificationsRussell Belfer2012-06-081-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are three actual changes in this commit: 1. When the trailing newline of a file is removed in a diff, the change will now be reported with `GIT_DIFF_LINE_DEL_EOFNL` passed to the callback. Previously, the `ADD_EOFNL` constant was given which was just an error in my understanding of when the various circumstances arose. `GIT_DIFF_LINE_ADD_EOFNL` is deprecated and should never be generated. A new newline is simply an `ADD`. 2. Rewrote the `diff_delta__merge_like_cgit` function that contains the core logic of the `git_diff_merge` implementation. The new version doesn't actually have significantly different behavior, but the logic should be much more obvious, I think. 3. Fixed a bug in `git_diff_merge` where it freed a string pool while some of the string data was still in use. This led to `git_diff_print_patch` accessing memory that had been freed. The rest of this commit contains improved documentation in `diff.h` to make the behavior and the equivalencies with core git clearer, and a bunch of new tests to cover the various cases, oh and a minor simplification of `examples/diff.c`.
* | Let platform 'Generic' get the regex deps so we don't need to use our ↵Chris Young2012-06-091-2/+2
| | | | | | | | external ones
* | allow disabling pthreads for testingChris Young2012-06-091-0/+6
| |
* | Fix makefileChris Young2012-06-091-3/+4
|/
* examples/network: consistently use tabs for indentationCarlos Martín Nieto2012-05-242-126/+126
|
* Fix examples/general.c compilationScott J. Goldman2012-05-201-1/+1
| | | | git_reference_listall() -> git reference_list()
* errors: Rename error codesbreaking-changesVicent Martí2012-05-181-2/+2
|
* errors: Rename the generic return codesVicent Martí2012-05-185-13/+13
|
* Basic setup for profilingRussell Belfer2012-05-172-2/+8
| | | | | This fixes the examples so they will build and adds a PROFILE option to the CMakeFile that enabled gprof info on non-Windows
* examples: fix an oopsieCarlos Martín Nieto2012-05-111-0/+1
|
* examples: update network examples error handlingCarlos Martín Nieto2012-05-101-2/+5
| | | | Use giterr_last() and make sure it's not NULL.
* remotes: change git_remote_new's signatureCarlos Martín Nieto2012-05-082-2/+2
| | | | | Add a fetch refspec arguemnt and make the arguments (name, url, refspec), as that order makes more sense.
* Merge branch 'new-error-handling' into developmentVicent Martí2012-05-024-74/+145
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .travis.yml include/git2/diff.h src/config_file.c src/diff.c src/diff_output.c src/mwindow.c src/path.c tests-clar/clar_helpers.c tests-clar/object/tree/frompath.c tests/t00-core.c tests/t03-objwrite.c tests/t08-tag.c tests/t10-refs.c tests/t12-repo.c tests/t18-status.c tests/test_helpers.c tests/test_main.c
| * remote: don't free transport on disconnectMichael Schubert2012-05-021-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, git_remote_disconnect not only closes the connection but also frees the underlying transport object, making it impossible to write code like // fetch stuff git_remote_download() // close connection git_remote_disconnect() // call user provided callback for each ref git_remote_update_tips(remote, callback) because remote->refs points to references owned by the transport object. This means, we have an idling connection while running the callback for each reference. Instead, allow immediate disconnect and free the transport later in git_remote_free().
| * remote: run a callback when updating the branch tipsCarlos Martín Nieto2012-04-252-2/+21
| | | | | | | | | | | | | | | | This allows the caller to update an internal structure or update the user output with the tips that were updated. While in the area, only try to update the ref if the value is different from its old one.
| * examples: run fetch in a background threadCarlos Martín Nieto2012-04-251-13/+56
| | | | | | | | This allows us to give updates on how it's doing
| * examples: port 'fetch' to the new APICarlos Martín Nieto2012-04-251-71/+22
| |
| * examples: stream indexer exampleCarlos Martín Nieto2012-04-131-0/+55
| |
| * Use new error handling in the example network codeCarlos Martín Nieto2012-04-111-1/+1
| |
* | examples/diff: update example codeschu2012-03-131-2/+2
|/ | | | Signed-off-by: schu <schu-github@schulog.org>
* Update diff to use iteratorsRussell Belfer2012-03-021-10/+33
| | | | | | | | | | | | | This is a major reorganization of the diff code. This changes the diff functions to use the iterators for traversing the content. This allowed a lot of code to be simplified. Also, this moved the functions relating to outputting a diff into a new file (diff_output.c). This includes a number of other changes - adding utility functions, extending iterators, etc. plus more tests for the diff code. This also takes the example diff.c program much further in terms of emulating git-diff command line options.
* Continue implementation of git-diffRussell Belfer2012-03-022-22/+100
| | | | | | | | * Implemented git_diff_index_to_tree * Reworked git_diff_options structure to handle more options * Made most of the options in git_diff_options actually work * Reorganized code a bit to remove some redundancy * Added option parsing to examples/diff.c to test most options