|
33f44db9
|
2018-01-25T22:17:39
|
|
examples: zero out our options memory before use
|
|
cc845595
|
2018-01-17T02:25:36
|
|
examples: fix remaining review comments
|
|
fb79d7d1
|
2018-01-17T02:34:32
|
|
examples: our/their can be NULL
|
|
5ce4f19b
|
2018-01-17T02:25:36
|
|
examples: move support code into static functions
|
|
503b30d5
|
2018-01-17T02:25:36
|
|
examples: hoist the merge analysis back into main
|
|
60c6547c
|
2018-01-17T02:25:36
|
|
examples: minor review fixups
|
|
59ea2c58
|
2018-01-17T02:25:36
|
|
examples: add merge
|
|
bb9353cf
|
2018-01-17T02:25:36
|
|
examples: Dead code & warnings
|
|
3fa5e577
|
2018-01-17T02:25:36
|
|
examples: Move xrealloc to common example code
|
|
b6720018
|
2018-01-17T02:25:36
|
|
examples: Switch to the nifty argv helpers from common
|
|
bf15dbf6
|
2017-11-06T12:47:40
|
|
examples: network: fix Win32 linking errors due to getline
The getline(3) function call is not part of ISO C and, most importantly,
it is not implemented on Microsoft Windows platforms. As our networking
example code makes use of getline, this breaks builds on MSVC and MinGW.
As this code wasn't built prior to the previous commit, this was never
noticed.
Fix the error by instead implementing a `readline` function, which
simply reads the password from stdin until it reads a newline
character.
|
|
9e3fb594
|
2017-10-29T15:32:18
|
|
Merge pull request #4373 from cjhoward92/examples/log-show-log-size
example-log: add support for --log-size
|
|
9b12eb6f
|
2017-10-20T15:05:26
|
|
examples: remove Makefile
Back in the days when libgit2 was still young, libgit2 was using plain
Makefiles as build infrastructure. We later changed that to instead use
the CMake build system to make cross-platform development easier. In the
process, we forgot to remove the Makefile from our examples directory,
which is fixed by this commit here. Furthermore, remove the accompanying
.gitignore file, which ignores build outputs. As we do out-of-tree
builds only nowadays, no output is generated in that directory anymore.
|
|
12a888d5
|
2017-10-13T07:18:54
|
|
examples: log: pass options pointer to print_commit
Cleaned up the PR to address styling issues.
|
|
1436b0e1
|
2017-10-11T21:47:58
|
|
example-log: add support for --log-size
|
|
f4770e47
|
2017-01-01T09:28:39
|
|
Fix Issue #4047 Check return codes and free objects
|
|
8e31cc25
|
2017-06-28T12:51:14
|
|
cmake: keep track of libraries and includes via lists
Later on, we will move detection of required libraries, library
directories as well as include directories into a separate
CMakeLists.txt file inside of the source directory. Obviously, we want
to avoid duplication here regarding these parameters.
To prepare for the split, put the parameters into three variables
LIBGIT2_LIBS, LIBGIT2_LIBDIRS and LIBGIT2_INCLUDES, tracking the
required libraries, linking directory as well as include directories.
These variables can later be exported into the parent scope from inside
of the source build instructions, making them readily available for the
other subdirectories.
|
|
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.
|