|
6c1b6b7a
|
2013-04-23T16:21:47
|
|
examples: init the threading system
|
|
32ef1d1c
|
2013-04-16T00:17:40
|
|
Fix examples
|
|
d064c747
|
2013-04-15T23:18:24
|
|
Merge remote-tracking branch 'ben/unified-revparse' into development
|
|
20156653
|
2013-04-15T13:29:40
|
|
Clean up minor details
|
|
5961d5ea
|
2013-04-15T12:10:18
|
|
Clean up example code.
|
|
299a224b
|
2013-04-15T12:00:04
|
|
Change git_revparse to output git_object pointers
This will probably prevent many lookup/free
operations in calling code.
|
|
0d3ccf0b
|
2013-04-10T16:41:05
|
|
examples: Don't print weird characters
|
|
9da187e8
|
2013-04-09T11:40:00
|
|
Fix clang warnings and improve checks
|
|
ec7e240b
|
2013-04-09T05:07:12
|
|
Add rev-list example to makefiles
|
|
1aa21fe3
|
2013-04-09T05:03:51
|
|
Deprecate git_revparse_single and _rangelike
|
|
d9ecaf8c
|
2013-04-07T07:22:38
|
|
Merge remote-tracking branch 'gnprice/revwalk' into development
|
|
2e233285
|
2013-03-20T09:39:20
|
|
examples: a test, for rev-list
This test file could probably be improved by a framework like
the one in git.git:t/, or by using a language like Python instead
of shell.
The other examples would benefit from tests too. Probably best
to settle on a framework to write them in, then add more tests.
Signed-off-by: Greg Price <price@mit.edu>
|
|
8f7f5e55
|
2013-03-31T14:56:32
|
|
examples: rev-list
This demonstrates parts of the interface for specifying revisions that
Git users are familiar with from 'git rev-list', 'git log', and other
Git commands. A similar query interface is used in out-of-core
command-line programs that browse a Git repo (like 'tig'), and may be
useful for an 'advanced search' interface in GUI or web applications.
In this version, we parse all the query modifiers we can support with
the existing logic in revwalk: basic include/exclude commits, and the
ordering flags. More logic will be required to support '--grep',
'--author', the pickaxe '-S', etc.
Signed-off-by: Greg Price <price@mit.edu>
|
|
f8591e51
|
2013-04-04T11:44:50
|
|
General example: run against testrepo.git
Fixes #1455
|
|
e2886f1e
|
2013-03-20T21:13:43
|
|
Fix link issue in network examples
|
|
7bd53bf3
|
2013-03-02T13:52:38
|
|
Simplify diff example using revparse
When the examples/diff.c was written, there was not yet a revparse
API. Now we can use it to make command line parsing way better
with less code. Yay!
|
|
5c46937b
|
2013-02-26T09:00:37
|
|
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.
|
|
a7ed7460
|
2013-02-15T15:58:13
|
|
Add rudimentary error checks and reformat comments
There were a number of functions assigning their return value to
`error` without much explanation. I added in some rudimentary
error checking to help flesh out the example.
Also, I reformatted all of the comments down to 80 cols (and in
some cases, slightly updated the wording).
|
|
9c258af0
|
2013-02-12T10:13:56
|
|
Merge pull request #1316 from ben/clone-cancel
Allow network operations to cancel
|
|
ef41ab88
|
2013-02-06T17:37:51
|
|
removed other references to api.html
|
|
fe95ac1b
|
2013-02-05T10:59:58
|
|
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.
|
|
7602cb7c
|
2013-01-31T10:44:57
|
|
Add user-from-url param to auth callback
|
|
c27e2112
|
2013-01-23T17:38:00
|
|
update examples to work on windows
|
|
75a0a800
|
2013-01-23T07:47:40
|
|
Don't clear the opt instance in the diff example.
The version field is overwritten otherwise. The opt instance is
already initialized properly.
|
|
cea994b9
|
2013-01-10T12:39:17
|
|
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.
|
|
cd5ca5b9
|
2013-01-02T13:50:41
|
|
Merge pull request #1152 from ben/clone-api-structification
Segregate in-memory and persisted remotes
|
|
730df6d0
|
2013-01-02T13:43:54
|
|
Include checkout options inline
|
|
0642c143
|
2013-01-02T12:44:47
|
|
Move `url` to last place in parameter list
|
|
dbc4aa07
|
2012-12-28T22:00:24
|
|
Update showindex example
I find the showindex example to be pretty useful on occasion, but
there were are couple of output tweaks I wanted, plus I wanted the
ability to specify a path to an actual index file instead of having
to open the whole repository. This makes those changes and expands
the example slightly.
|
|
3de22567
|
2012-12-27T11:12:14
|
|
Fix warnings in example
|
|
69d1bd91
|
2012-12-21T15:30:46
|
|
Fix examples
|
|
29f27599
|
2012-12-20T10:51:09
|
|
Rename remote creation APIs
git_remote_add -> git_remote_create
git_remote_new -> git_remote_create_inmemory
|
|
316bca69
|
2012-12-19T17:07:12
|
|
Fix clone sample
|
|
56c72b75
|
2012-12-17T11:00:53
|
|
Fix diff constructor name order confusion
The diff constructor functions had some confusing names, where the
"old" side of the diff was coming after the "new" side. This
reverses the order in the function name to make it less confusing.
Specifically...
* git_diff_index_to_tree becomes git_diff_tree_to_index
* git_diff_workdir_to_index becomes git_diff_index_to_workdir
* git_diff_workdir_to_tree becomes git_diff_tree_to_workdir
|
|
cc3e9b5a
|
2012-12-16T10:50:10
|
|
Make building samples more friendly
|
|
b9e7e2b4
|
2012-12-14T13:46:45
|
|
Move non-options back out of options struct
|
|
0015b587
|
2012-12-14T13:18:06
|
|
Deploy git_clone_options to network sample
|
|
2b10a2b0
|
2012-12-13T11:47:14
|
|
Enable authenticated clones in network sample
|
|
24393ea6
|
2012-12-13T09:14:56
|
|
Stop premature remote freeing when cloning
|
|
34c8c754
|
2012-12-13T08:54:23
|
|
Fix network example
|
|
9267ff58
|
2012-11-29T20:01:24
|
|
Deploy GIT_REMOTE_CALLBACKS_INIT
|
|
2f8d30be
|
2012-11-29T15:05:04
|
|
Deploy GIT_DIFF_OPTIONS_INIT
|
|
b81aa2f1
|
2012-11-29T14:06:40
|
|
Deploy GIT_CHECKOUT_OPTS_INIT
|
|
df705148
|
2012-11-27T13:15:43
|
|
API updates for remote.h
Includes typedef for git_direction, and renames for
GIT_DIR_[FETCH|PUSH] to GIT_DIRECTION_(\1).
|
|
f45d51ff
|
2012-11-20T19:57:46
|
|
API updates for index.h
|
|
793c4385
|
2012-11-20T16:36:06
|
|
Update diff callback param order
This makes the diff functions that take callbacks both take
the payload parameter after the callback function pointers and
pass the payload as the last argument to the callback function
instead of the first. This should make them consistent with
other callbacks across the API.
|
|
e120123e
|
2012-11-20T14:01:46
|
|
API review / update for tree.h
|
|
3f63cc9e
|
2012-11-18T22:20:47
|
|
Examples: fix clone api
|
|
bac695b5
|
2012-11-18T22:20:26
|
|
Examples: fix reference names
|
|
aa8a76ef
|
2012-11-17T05:12:14
|
|
tag: rename git_tag_type to git_tag_target_type
|
|
bbe6dbec
|
2012-11-14T23:29:48
|
|
Add explicit git_index ptr to diff and checkout
A number of diff APIs and the `git_checkout_index` API take a
`git_repository` object an operate on the index. This updates
them to take a `git_index` pointer explicitly and only fall back
on the `git_repository` index if the index input is NULL. This
makes it easier to operate on a temporary index.
|
|
0f3def71
|
2012-11-09T11:19:46
|
|
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.
|
|
b90500f0
|
2012-11-01T14:08:30
|
|
Improve docs, examples, warnings
This improves docs in some of the public header files, cleans
up and improves some of the example code, and fixes a couple
of pedantic warnings in places.
|
|
f45ec1a0
|
2012-10-29T20:04:21
|
|
index refactoring
|
|
1e3b8ed5
|
2012-10-24T14:07:07
|
|
Remove 'bytes' param from git_remote_download
|
|
9762ad99
|
2012-10-24T13:43:23
|
|
Renaming: fix example
|
|
7d222e13
|
2012-10-24T13:29:14
|
|
Network progress: rename things
git_indexer_stats and friends -> git_transfer_progress*
Also made git_transfer_progress members more sanely
named.
|
|
2dae54a9
|
2012-10-19T20:24:15
|
|
Improve clone sample's formatting
|
|
9c05c17b
|
2012-10-19T20:05:18
|
|
Checkout progress now reports completed/total steps
|
|
7bcd9e23
|
2012-10-19T19:23:32
|
|
gitno_buffer: callback on each packet
The fetch code takes advantage of this to implement a
progress callback every 100kb of transfer.
|
|
45b60d7b
|
2012-10-18T15:17:12
|
|
Correct progress reporting from checkout
|
|
aa1e8674
|
2012-10-18T12:57:47
|
|
Clone: in-line callbacks for progress
Also implemented in the git2 example.
|
|
7635a118
|
2012-10-17T14:06:32
|
|
Fix example compilation
|
|
2b7efe03
|
2012-10-17T10:15:51
|
|
Example: compile fixes (not yet working)
|
|
d57c47dc
|
2012-10-16T13:29:12
|
|
Add accessor for git_remote's stats field
Also converted the network example to use it.
|
|
2af1c266
|
2012-09-30T11:02:53
|
|
examples: fix config getter param order
|
|
0a1db746
|
2012-05-14T20:46:30
|
|
examples: add progress output to fetch
|
|
bffa852f
|
2012-07-13T12:01:11
|
|
indexer: recognize and mark when all of the packfile has been downloaded
We can't always rely on the network telling us when the download is
finished. Recognize it from the indexer itself.
|
|
f98c32f3
|
2012-08-19T01:26:06
|
|
Merge pull request #778 from ben/clone
Clone
|
|
383fb799
|
2012-07-31T08:51:38
|
|
Rename example function to avoid name collision.
|
|
7e02c7c5
|
2012-07-31T08:45:42
|
|
Checkout: save index on checkout.
|
|
84595a30
|
2012-07-30T14:38:32
|
|
Add clone to the network example.
|
|
ae789622
|
2012-07-25T10:52:20
|
|
examples: fix warnings in network/
|
|
64d01de8
|
2012-07-24T14:23:16
|
|
remote: start moving the protocol to a common area
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.
|
|
b3aaa7a7
|
2012-07-21T17:52:51
|
|
Add a struct for network callbacks
Currently only update_tips is used, but it prepares the way for
progress output during download.
|
|
6b9a49cd
|
2012-07-10T21:50:36
|
|
Updating language in examples README
|
|
13f9eb24
|
2012-06-29T19:23:36
|
|
examples: add README
|
|
37159957
|
2012-06-28T09:33:08
|
|
indexer: don't use '/objects/pack/' unconditionally
Not everyone who indexes a packfile wants to put it in the standard
git repository location.
|
|
66a8b662
|
2012-06-14T19:15:46
|
|
Fix incorrect revert
|
|
a8df98c6
|
2012-06-14T18:57:24
|
|
Updates from comments on OS4 compatibility pull request http://github.com/libgit2/libgit2/pull/766
|
|
a21bb1aa
|
2012-06-13T23:28:51
|
|
Merge remote-tracking branch 'source/development' into development
|
|
41cbbea8
|
2012-06-09T23:03:27
|
|
Let platform 'Generic' get the regex deps so we don't need to use our external ones
|
|
5c0fd7b9
|
2012-06-09T13:20:07
|
|
allow disabling pthreads for testing
|
|
bb502fa8
|
2012-06-09T12:52:49
|
|
Fix makefile
|
|
145e696b
|
2012-06-08T11:56:24
|
|
Minor fixes, cleanups, and clarifications
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`.
|
|
7eeec8f2
|
2012-05-24T16:41:53
|
|
examples/network: consistently use tabs for indentation
|
|
ab4aa138
|
2012-05-20T00:40:31
|
|
Fix examples/general.c compilation
git_reference_listall() -> git reference_list()
|
|
904b67e6
|
2012-05-18T01:48:50
|
|
errors: Rename error codes
|
|
e172cf08
|
2012-05-18T01:21:06
|
|
errors: Rename the generic return codes
|
|
706a9974
|
2012-05-17T13:05:17
|
|
Basic setup for profiling
This fixes the examples so they will build and adds a PROFILE
option to the CMakeFile that enabled gprof info on non-Windows
|
|
41178b41
|
2012-05-11T21:49:33
|
|
examples: fix an oopsie
|
|
fb49bdf9
|
2012-05-10T16:52:12
|
|
examples: update network examples error handling
Use giterr_last() and make sure it's not NULL.
|
|
baaa8a44
|
2012-05-03T20:25:56
|
|
remotes: change git_remote_new's signature
Add a fetch refspec arguemnt and make the arguments (name, url,
refspec), as that order makes more sense.
|
|
40879fac
|
2012-05-02T15:59:02
|
|
Merge branch 'new-error-handling' into development
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
|
|
42ea35c0
|
2012-05-01T22:25:43
|
|
remote: don't free transport on disconnect
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().
|
|
f184836b
|
2012-04-25T12:13:20
|
|
remote: run a callback when updating the branch tips
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.
|
|
bf4ef0c5
|
2012-04-16T05:02:41
|
|
examples: run fetch in a background thread
This allows us to give updates on how it's doing
|
|
db0f96a6
|
2012-04-13T23:37:55
|
|
examples: port 'fetch' to the new API
|
|
907ebe85
|
2012-04-13T10:29:27
|
|
examples: stream indexer example
|
|
fc1cc205
|
2012-03-26T11:36:12
|
|
Use new error handling in the example network code
|