|
f0ca00e0
|
2017-05-03T12:25:48
|
|
examples: network: refactor credentials callback
The credentials callback reads the username and password via scanf into
fixed-length arrays. While these are simply examples and as such not as
interesting, the unchecked return value of scanf causes GCC to emit
warnings. So while we're busy to shut up GCC, we also fix the possible
overflow of scanf by using getline instead.
|
|
f9ea8c6a
|
2017-01-12T22:02:14
|
|
examples: general: fix memory leaks
|
|
ed2b1c7e
|
2017-01-12T22:01:45
|
|
examples: general: display config only if it was found
|
|
5aa10107
|
2017-01-12T22:01:23
|
|
examples: general: narrow down scope of loop variables
|
|
8572e225
|
2017-01-12T22:00:53
|
|
examples: general: clean up committer/author variables
|
|
3fdba15c
|
2017-01-09T14:09:57
|
|
fix examples/network/clone.c: heap-buffer-overflow
Format of a length of string to the correct format is:%.*s
|
|
832278bf
|
2016-12-29T07:43:03
|
|
Fix issue #4046 Seg fault in config_files()
|
|
fc293919
|
2016-08-16T11:43:10
|
|
examples: add: fix type casting warning
|
|
5c2a8361
|
2016-08-16T11:01:09
|
|
examples: diff: parse correct types for line-diffopts
|
|
7314da10
|
2016-08-16T10:55:28
|
|
examples: fix warnings in network/fetch.c
|
|
e2d1b7ec
|
2016-08-16T10:46:35
|
|
examples: general: fix remaining warnings
|
|
662eee15
|
2016-08-16T10:09:52
|
|
examples: general: convert C99 comments to C90 comments
|
|
c313e3d9
|
2016-09-01T12:44:08
|
|
examples: general: extract function demonstrating OID parsing
|
|
29d9afc0
|
2016-08-16T10:06:17
|
|
examples: general: extract function demonstrating ODB
|
|
b009adad
|
2016-08-16T09:59:28
|
|
examples: general: extract function demonstrating commit writing
|
|
15960454
|
2016-08-16T09:36:31
|
|
examples: general: extract functions demonstrating object parsing
|
|
8b93ccdf
|
2016-08-16T09:35:08
|
|
examples: general: extract function demonstrating revwalking
|
|
c079e3c8
|
2016-08-16T09:32:15
|
|
examples: general: extract function demonstrating index walking
|
|
f9a7973d
|
2016-08-16T09:29:14
|
|
examples: general: extract function demonstrating reference listings
|
|
986913f4
|
2016-08-16T09:25:06
|
|
examples: general: extract function demonstrating config files
|
|
176d58ba
|
2016-08-16T09:17:12
|
|
examples: general: use tabs instead of spaces
|
|
07bd3e57
|
2015-05-07T12:57:56
|
|
proxy: ask the user for credentials if necessary
|
|
698e0c27
|
2016-03-07T16:34:30
|
|
Update link to Pro Git's Git internals chapter.
|
|
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
|