|
8b8f1f91
|
2015-10-07T14:01:05
|
|
fix return
|
|
5d7cd57f
|
2015-09-08T14:15:29
|
|
Update another call to git_remote_connect
|
|
97c0a85f
|
2015-07-13T11:23:07
|
|
Merge pull request #3306 from libgit2/cmn/fetch-ex-fetch
examples: modernise the fetch example
|
|
768f8be3
|
2015-06-30T19:00:41
|
|
Fix #3094 - improve use of portable size_t/ssize_t format specifiers.
The header src/cc-compat.h defines portable format specifiers PRIuZ, PRIdZ, and PRIxZ. The original report highlighted the need to use these specifiers in examples/network/fetch.c. For this commit, I checked all C source and header files not in deps/ and transitioned to the appropriate format specifier where appropriate.
|
|
6c7e86e1
|
2015-07-12T19:41:01
|
|
examples: modernise the fetch example
Under normal conditions, git_remote_fetch() should be the only function
used to perform a fetch. Don't let the example lead people astray.
|
|
d202bb7d
|
2015-06-29T21:48:35
|
|
examples: clean up some warnings
|
|
c2418f46
|
2015-06-25T12:48:44
|
|
Rename FALLBACK to UNSPECIFIED
Fallback describes the mechanism, while unspecified explains what the
user is thinking.
|
|
7d6dacdc
|
2015-05-09T10:42:00
|
|
examples: adjust to submodule status API change
|
|
9334c86f
|
2015-06-03T14:54:26
|
|
print_usage functions is defined but not used
Use the previously created function to display a message when the arguments are not valid.
ticket 3095
|
|
ae5b9362
|
2015-05-17T15:11:45
|
|
remote: remove fetch parameter from create_anonymous
An anonymous remote is not configured and cannot therefore have
configured refspecs. Remove the parameter which adds this from the
constructor.
|
|
cf66c474
|
2015-05-06T12:26:05
|
|
examples: show the sideband progress on clone
This lets us see what the server (or libgit2 locally) is doing, rather
than having to stare at a non-moving screen.
|
|
3fec548a
|
2015-04-23T06:01:13
|
|
examples: adjust to the new remote API
|
|
785990be
|
2015-05-02T12:16:22
|
|
Restructured to be nicer example
Code restructured to better represent best practice when
using libgit2.
|
|
9bff15f4
|
2015-04-30T15:10:28
|
|
Added call to git_libgit2_shutdown()
Added forgotten call to git_libgit2_shutdown() to the /examples/network/git2.c.
|
|
c843736d
|
2015-04-07T14:43:04
|
|
describe example: enable building by default.
|
|
0a2f99fd
|
2015-01-26T15:36:34
|
|
examples: add remote example.
|
|
72ca65d5
|
2015-03-03T10:07:36
|
|
Merge pull request #2808 from libgit2/cmn/repo-ident
Remove the signature from ref-modifying functions
|
|
659cf202
|
2015-01-07T12:23:05
|
|
Remove the signature from ref-modifying functions
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.
|
|
fe477951
|
2015-03-03T14:35:10
|
|
Merge pull request #2885 from JIghtuse/master
describe example: function to add commits to opts
|
|
14fec0ae
|
2015-02-14T12:10:00
|
|
example: drop `SAFE_CREATE` from clone example
|
|
23d1dbe9
|
2015-02-06T11:43:12
|
|
describe example: function to add commits to opts
Add safe function to (a,rea)llocate memory which terminate example on
memory allocation failure.
Move code to allocate commits to its own function.
|
|
2107dac3
|
2015-02-04T15:14:18
|
|
for-each-ref example: init/shutdown libgit2 in main
I don't get how it was working without git_libgit2_init() call. I run it
and libgit2 throws assertion somewhere in its internals. Now it works.
Updated commit with shutdown at the end.
|
|
36e13399
|
2015-01-25T22:34:46
|
|
describe example: fix memory allocation size
We need to allocate memory for sizeof(char *) * ncommits, not just for
ncommits.
Issue detected by GCC's AddressSanitizer.
|
|
9af3c416
|
2015-01-10T18:05:01
|
|
clone example: don't divide by zero
Local transports don't have data about the size, avoid dividing by
zero in the callback.
|
|
b874629b
|
2014-12-04T21:06:59
|
|
Spelling fixes
|
|
2e1e0f10
|
2014-11-21T17:24:55
|
|
blame: Do not assume blob contents are NULL-terminated
|
|
799e22ea
|
2014-10-23T17:34:41
|
|
Rename git_threads_ to git_libgit2_
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.
|
|
209425ce
|
2014-11-08T13:25:51
|
|
remote: rename _load() to _lookup()
This brings it in line with the rest of the lookup functions.
|
|
d6bbcefc
|
2014-10-12T15:52:53
|
|
describe: add example
|
|
3f894205
|
2014-06-06T15:01:45
|
|
remote: allow overriding the refspecs for download and fetch
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.
|
|
14556cbf
|
2014-09-17T17:13:25
|
|
Merge pull request #2567 from cirosantilli/factor-41
Factor 40 and 41 constants from source.
|
|
3b2cb2c9
|
2014-09-16T11:49:25
|
|
Factor 40 and 41 constants from source.
|
|
2c22193b
|
2014-09-16T08:56:33
|
|
Fix typo
|
|
bd465f9c
|
2014-09-01T23:36:12
|
|
Fix warning
|
|
33bf1b1a
|
2014-05-28T09:40:08
|
|
examples/log.c: invert filtering impl and conditional
|
|
26cce321
|
2014-05-23T12:59:19
|
|
Add support for --grep
|
|
161e6dc1
|
2014-05-23T12:27:16
|
|
Add --committer option, and break out helper function
|
|
97fc71ab
|
2014-05-22T16:01:45
|
|
Add support for --author flag in example log implementation
|
|
ead9c591
|
2014-05-21T17:25:00
|
|
Include windows.h on win32 for Sleep
|
|
56ec2256
|
2014-05-08T01:06:38
|
|
examples: add a basic for-each-ref example
This is quite close to running "git for-each-ref" except:
1. It does not take any formatting or selection options at
all.
2. The output is not sorted.
I wrote it to look at debugging some issues with ref
iteration, but there's no reason it can't live on as an
example command.
|
|
d0420fc6
|
2014-05-01T22:39:35
|
|
Make examples/status.c compile on Windows
|
|
8443ed6c
|
2014-04-25T02:10:19
|
|
Merge pull request #2284 from jacquesg/push-progress-callback
Fire progress and update tips callbacks also for pushes.
|
|
8d09efa2
|
2014-04-22T12:33:27
|
|
Use git_diff_get_stats in example/diff + refactor
This takes the `--stat` and related example options in the example
diff.c program and converts them to use the `git_diff_get_stats`
API which nicely formats stats for you.
I went to add bar-graph scaling to the stats formatter and noticed
that the `git_diff_stats` structure was holding on to all of the
`git_patch` objects. Unfortunately, each of these objects keeps
the full text of the diff in memory, so this is very expensive. I
ended up modifying `git_diff_stats` to keep just the data that it
needs to keep and allowed it to release the patches. Then, I added
width scaling to the output on top of that.
In making the diff example program match 'git diff' output, I ended
up removing an newline from the sumamry output which I then had to
compensate for in the email formatting to match the expectations.
Lastly, I went through and refactored the tests to use a couple of
helper functions and reduce the overall amount of code there.
|
|
12e422a0
|
2014-04-21T16:08:05
|
|
Some doc and examples/diff.c changes
I was playing with "git diff-index" and wanted to be able to
emulate that behavior a little more closely with the diff example.
Also, I wanted to play with running `git_diff_tree_to_workdir`
directly even though core Git doesn't exactly have the equivalent,
so I added a command line option for that and tweaked some other
things in the example code.
This changes a minor output thing in that the "raw" print helper
function will no longer add ellipses (...) if the OID is not
actually abbreviated.
|
|
48e60ae7
|
2014-04-21T11:23:29
|
|
Don't redefine the same callback types, their signatures may change
|
|
d543d59c
|
2014-03-28T10:42:38
|
|
Add some funny options for debugging status
This allows you to use a --repeat option to run status over and
over and see how the output changes as you make local directory
changes without reopening the git_repository object each time.
Also, adds a flag to explicitly list the submodules before status.
|
|
a2d18a02
|
2014-04-01T13:47:52
|
|
Merge pull request #2228 from mekishizufu/example_short_id
Use git_object_short_id in examples
|
|
9325460a
|
2014-04-01T13:47:44
|
|
Merge pull request #2206 from libgit2/cmn/inmemory-swap-order
Rename in-memory remote to anonymous and swap url and fetch order
|
|
fd536d29
|
2014-03-26T11:15:57
|
|
remote: rename inmemory to anonymous and swap url and fetch order
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.
|
|
6ad59ef1
|
2014-04-01T12:16:40
|
|
examples: Use git_object_short_id
|
|
a15c7802
|
2014-03-25T09:14:48
|
|
Make submodules externally refcounted
`git_submodule` objects were already refcounted internally in case
the submodule name was different from the path at which it was
stored. This makes that refcounting externally used as well, so
`git_submodule_lookup` and `git_submodule_add_setup` return an
object that requires a `git_submodule_free` when done.
|
|
041cd4a2
|
2014-03-07T19:02:58
|
|
Merge pull request #2028 from libgit2/options-names
Rename options structures
|
|
5a6de908
|
2014-03-07T09:13:43
|
|
Merge pull request #2153 from mekishizufu/tag_example
Add a tag example
|
|
6affd71f
|
2014-01-03T17:38:34
|
|
git_checkout_opts -> git_checkout_options
|
|
6246de93
|
2014-03-06T11:16:36
|
|
Merge completed: resolve the conflict with the upstream
|
|
feebe615
|
2014-03-05T20:26:13
|
|
Move all variable declarations to the top of the block
|
|
a53b8584
|
2014-03-03T23:56:43
|
|
Add tag example
|
|
8384a50a
|
2014-03-05T20:33:20
|
|
fix the output format of diff
|
|
45d2e8dc
|
2014-03-05T20:13:34
|
|
Add the --shortstat flag to examples/diff.c
|
|
0d3c8a9d
|
2014-03-05T13:06:31
|
|
examples/diff: Add minimal, patience diff options.
- Add minimal, patience diff options to diff example. libgit2
`diff_xdiff.git_xdiff_init` already supports these flags, so
no additional change is necessary.
- Remove minimal and patience flag addition from project list.
|
|
b43f35fd
|
2014-03-03T14:59:50
|
|
- examples CMakeLists.txt reverted to previous state
|
|
6874cafd
|
2014-03-03T12:08:17
|
|
cmake examples change so that general.c is off by default
|
|
0330469f
|
2014-03-03T11:42:25
|
|
- general.c reverted to original( before pr state )
|
|
b5212858
|
2014-03-03T11:40:22
|
|
Merge remote-tracking branch 'remotes/upstream/development' into development
|
|
d8839992
|
2014-02-27T14:01:16
|
|
Fix warnings and code style issues
|
|
300f4412
|
2014-02-25T11:56:11
|
|
- BUGFIX #2133 (@fourplusone) in smart_protocol.c
- 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
|
|
899bd19a
|
2014-02-24T21:20:57
|
|
Document enumerator and rewording
|
|
c7c83394
|
2014-02-21T00:22:07
|
|
Add option to limit blame to first parent
|
|
8086b78b
|
2014-02-09T21:08:42
|
|
replace 'out' with 'patch',replace the literal tabs with '\t'.
|
|
4f5a3f40
|
2014-02-08T20:10:19
|
|
add example for diff with --numstat
|
|
5c8be325
|
2014-02-05T13:32:45
|
|
Fix a few references to changed function signatures
|
|
93954245
|
2014-01-27T09:39:36
|
|
Merge pull request #2075 from libgit2/cmn/leftover-oid
Leftover OID -> ID changes
|
|
c90ea3de
|
2014-01-27T09:34:52
|
|
Merge pull request #2078 from linquize/msvc
MSVC doesn't like modern code neither
|
|
1664aaaa
|
2013-11-05T23:39:05
|
|
Make blame example compile on MSVC
|
|
fbc5661e
|
2014-01-27T20:51:46
|
|
MSVC doesn't like modern code neither
|
|
d541170c
|
2014-01-24T11:36:41
|
|
index: rename an entry's id to 'id'
This was not converted when we converted the rest, so do it now.
|
|
83e1efbf
|
2013-11-14T14:10:32
|
|
Update files that reference tests-clar
|
|
fb190bbb
|
2013-11-12T19:44:13
|
|
Fix warnings
|
|
6414fd33
|
2013-11-11T06:47:15
|
|
Merge pull request #1956 from libgit2/cmn/fetch-default-head
Remote revamp (director's cut)
|
|
359dce72
|
2013-11-02T00:05:32
|
|
remote: make _ls return the list directly
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.
|
|
ad62f2ee
|
2013-11-07T12:00:43
|
|
update example to new packfile creation signature
|
|
b4794925
|
2013-11-04T15:54:11
|
|
blame sample: usage comment
|
|
ea8ce3d1
|
2013-11-04T15:50:33
|
|
Fix warnings
|
|
e6b85be7
|
2013-11-04T15:48:35
|
|
Reorganize and doc-commentify blame sample.
|
|
b7bb086b
|
2013-11-04T15:25:26
|
|
Standardize layout of blame sample
|
|
fb6b0e01
|
2013-11-04T10:44:59
|
|
Merge pull request #1317 from libgit2/blame
Blame Canada
|
|
a605bbd9
|
2013-11-04T10:14:22
|
|
Merge pull request #1934 from libgit2/relicense-examples
Relicense examples under CC0
|
|
5a0b8803
|
2013-11-04T08:05:55
|
|
Merge pull request #1929 from libgit2/rb/misc-diff-fixes
Fix some observed problems with incorrect diffs
|
|
becb13c0
|
2013-11-03T13:46:07
|
|
examples: doc update
Update the explanation to reflect our use of git_status_list_new() and
make the breaks in rocco more meaningful.
Clarify why GIT_STATUS_CURRENT and index_to_workdir don't always imply
each other. Fixes #1740.
|
|
6cb831bd
|
2013-11-02T05:33:26
|
|
Replace copyright topmatter in example files
|
|
dcfdb977
|
2013-11-01T10:51:12
|
|
Relicense examples under CC0
|
|
4bf630b6
|
2013-10-31T14:36:52
|
|
Make diff and status perform soft index reload
This changes `git_index_read` to have two modes - a hard index
reload that always resets the index to match the on-disk data
(which was the old behavior) and a soft index reload that uses
the timestamp / file size information and only replaces the index
data if the file on disk has been modified.
This then updates the git_status code to do a soft reload unless
the new GIT_STATUS_OPT_NO_REFRESH flag is passed in.
This also changes the behavior of the git_diff functions that use
the index so that when an index is not explicitly passed in (i.e.
when the functions call git_repository_index for you), they will
also do a soft reload for you.
This intentionally breaks the file signature of git_index_read
because there has been some confusion about the behavior previously
and it seems like all existing uses of the API should probably be
examined to select the desired behavior.
|
|
567649f2
|
2013-11-01T09:38:34
|
|
Merge pull request #1916 from libgit2/simplify-examples
Fix examples to make the important stuff more obvious
|
|
ac5e507c
|
2013-11-01T09:31:52
|
|
Merge pull request #1918 from libgit2/cmn/indexer-naming
indexer: remove the stream infix
|
|
4f62d559
|
2013-11-01T05:39:21
|
|
Fix typos
|
|
c44820c6
|
2013-10-31T23:42:50
|
|
A few formatting changes for rocco
I'm not too happy about manually inserting < and > but those get
output as html tags otherwise.
|
|
76120863
|
2013-10-31T14:48:41
|
|
Update examples/README.md
|
|
85c6730c
|
2013-10-31T14:35:32
|
|
Format comments for use with docco
|
|
864e7271
|
2013-10-31T20:58:00
|
|
Use gmtime() instead of gmtime_t()
The latter is not available on Windows
|
|
dbdb22b3
|
2013-10-30T13:20:08
|
|
Clean up showindex sample
|