summaryrefslogtreecommitdiff
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* describe: add exampleLinquize2014-10-123-0/+198
|
* remote: allow overriding the refspecs for download and fetchCarlos Martín Nieto2014-09-301-1/+1
| | | | | | | 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.
* Merge pull request #2567 from cirosantilli/factor-41Vicent Marti2014-09-173-6/+6
|\ | | | | Factor 40 and 41 constants from source.
| * Factor 40 and 41 constants from source.Ciro Santilli2014-09-163-6/+6
| |
* | Fix typoLinquize2014-09-161-1/+1
|/
* Fix warningLinquize2014-09-011-1/+1
|
* examples/log.c: invert filtering impl and conditionalEoin Coffey2014-05-281-14/+14
|
* Add support for --grepEoin Coffey2014-05-231-1/+23
|
* Add --committer option, and break out helper functionEoin Coffey2014-05-231-7/+21
|
* Add support for --author flag in example log implementationEoin Coffey2014-05-221-1/+10
|
* Include windows.h on win32 for SleepEdward Thomson2014-05-211-2/+3
|
* examples: add a basic for-each-ref examplepeff/iconvJeff King2014-05-083-0/+48
| | | | | | | | | | | | | 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.
* Make examples/status.c compile on WindowsLinquize2014-05-011-0/+4
|
* Merge pull request #2284 from jacquesg/push-progress-callbackVicent Marti2014-04-251-1/+1
|\ | | | | Fire progress and update tips callbacks also for pushes.
| * Don't redefine the same callback types, their signatures may changeJacques Germishuys2014-04-211-1/+1
| |
* | Use git_diff_get_stats in example/diff + refactorRussell Belfer2014-04-221-66/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Some doc and examples/diff.c changesRussell Belfer2014-04-221-65/+86
|/ | | | | | | | | | | | | | 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.
* Add some funny options for debugging statusRussell Belfer2014-04-011-9/+50
| | | | | | | | 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.
* Merge pull request #2228 from mekishizufu/example_short_idVicent Marti2014-04-011-4/+6
|\ | | | | Use git_object_short_id in examples
| * examples: Use git_object_short_idJiri Pospisil2014-04-011-4/+6
| |
* | Merge pull request #2206 from libgit2/cmn/inmemory-swap-orderVicent Marti2014-04-012-2/+2
|\ \ | |/ |/| Rename in-memory remote to anonymous and swap url and fetch order
| * remote: rename inmemory to anonymous and swap url and fetch orderCarlos Martín Nieto2014-04-012-2/+2
| | | | | | | | | | | | | | | | | | | | 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.
* | Make submodules externally refcountedRussell Belfer2014-03-251-11/+14
|/ | | | | | | | `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.
* Merge pull request #2028 from libgit2/options-namesVicent Marti2014-03-071-1/+1
|\ | | | | Rename options structures
| * git_checkout_opts -> git_checkout_optionsBen Straub2014-03-061-1/+1
| |
* | Merge pull request #2153 from mekishizufu/tag_exampleRussell Belfer2014-03-073-1/+319
|\ \ | |/ |/| Add a tag example
| * Move all variable declarations to the top of the blockJiri Pospisil2014-03-051-4/+7
| |
| * Add tag exampleJiri Pospisil2014-03-053-1/+316
| |
* | Merge completed: resolve the conflict with the upstreamSun He2014-03-061-0/+4
|\ \ | |/
| * examples/diff: Add minimal, patience diff options.Brian Gesiak2014-03-051-0/+4
| | | | | | | | | | | | | | - 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.
* | fix the output format of diffSun He2014-03-051-2/+2
| |
* | Add the --shortstat flag to examples/diff.cSun He2014-03-051-1/+51
|/
* - examples CMakeLists.txt reverted to previous stateMiha Ravšelj2014-03-031-5/+1
|
* cmake examples change so that general.c is off by defaultMiha2014-03-031-1/+5
|
* - general.c reverted to original( before pr state )Miha2014-03-031-39/+43
|
* Merge remote-tracking branch 'remotes/upstream/development' into developmentMiha2014-03-032-7/+16
|\
| * Fix warnings and code style issuesRussell Belfer2014-02-271-7/+11
| |
| * Document enumerator and rewordingJuan Rubén2014-02-241-1/+1
| |
| * Add option to limit blame to first parentJuan Rubén2014-02-231-0/+5
| |
* | - BUGFIX #2133 (@fourplusone) in smart_protocol.cMiha2014-02-256-48/+45
|/ | | | | | - 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
* replace 'out' with 'patch',replace the literal tabs with '\t'.rocky-luo2014-02-091-6/+6
|
* add example for diff with --numstatrocky-luo2014-02-081-8/+38
|
* Fix a few references to changed function signaturesBen Straub2014-02-051-1/+1
|
* Merge pull request #2075 from libgit2/cmn/leftover-oidVicent Marti2014-01-271-1/+1
|\ | | | | Leftover OID -> ID changes
| * index: rename an entry's id to 'id'Carlos Martín Nieto2014-01-251-1/+1
| | | | | | | | This was not converted when we converted the rest, so do it now.
* | Merge pull request #2078 from linquize/msvcVicent Marti2014-01-271-2/+1
|\ \ | | | | | | MSVC doesn't like modern code neither
| * | MSVC doesn't like modern code neitherLinquize2014-01-271-2/+1
| |/
* | Make blame example compile on MSVCLinquize2014-01-271-0/+5
|/
* Update files that reference tests-clarBen Straub2013-11-142-2/+2
|
* Fix warningsLinquize2013-11-121-1/+1
|