summaryrefslogtreecommitdiff
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | indexer: fix thin packsCarlos Martín Nieto2013-10-041-1/+1
| | |/ / | |/| | | | | | | | | | | | | | | | | | When given an ODB from which to read objects, the indexer will attempt to inject the missing bases at the end of the pack and update the header and trailer to reflect the new contents.
* | | | Create git_diff_line and extend git_diff_hunkRussell Belfer2013-10-212-18/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of having functions with so very many parameters to pass hunk and line data, this takes the existing git_diff_hunk struct and extends it with more hunk data, plus adds a git_diff_line. Those structs are used to pass back hunk and line data instead of the old APIs that took tons of parameters. Some work that was previously only being done for git_diff_patch creation (scanning the diff content for exact line counts) is now done for all callbacks, but the performance difference should not be noticable.
* | | | Diff API cleanupRussell Belfer2013-10-152-22/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This lays groundwork for separating formatting options from diff creation options. This groups the formatting flags separately from the diff list creation flags and reorders the options. This also tweaks some APIs to further separate code that uses patches from code that just looks at git_diffs.
* | | | Rename diff objects and split patch.hRussell Belfer2013-10-112-10/+10
| |_|/ |/| | | | | | | | | | | | | | This makes no functional change to diff but renames a couple of the objects and splits the new git_patch (formerly git_diff_patch) into a new header file.
* | | clone: put the callbacks struct directly in the clone optionsCarlos Martín Nieto2013-10-021-5/+3
| | | | | | | | | | | | There's no need for this to be a pointer to somewhere else.
* | | remote: move the credentials callback to the structCarlos Martín Nieto2013-10-023-3/+5
| | | | | | | | | | | | | | | Move this one as well, letting us have a single way of setting the callbacks for the remote, and removing fields from the clone options.
* | | remote: put the _download() callback with the othersCarlos Martín Nieto2013-10-022-3/+5
|/ / | | | | | | | | | | The text progress and update_tips callbacks are already part of the struct, which was meant to unify the callback setup, but the download one was left out.
* | Some tests with ident and crlf filtersRussell Belfer2013-09-171-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed the filter order to match core Git, too. This test demonstrates an interesting behavior of core Git (which is totally reasonable and which libgit2 matches, although mostly by coincidence). If you use the ident filter and commit a file with a garbage ident in it, like '$Id: this is just garbage$' and then immediately do a 'git checkout-index' with the new file, Git will not consider the file out of date and will not overwrite the file with an updated $Id$. Libgit2 has the same behavior. If you remove the file and then do a checkout-index, it will be replaced with a filtered version that has injected the OID correctly.
* | No such thing as an orphan branchCarlos Martín Nieto2013-09-171-1/+1
|/ | | | | | | | | | | Unfortunately git-core uses the term "unborn branch" and "orphan branch" interchangeably. However, "orphan" is only really there for the checkout command, which has the `--orphan` option so it doesn't actually create the branch. Branches never have parents, so the distinction of a branch with no parents is odd to begin with. Crucially, the error messages deal with unborn branches, so let's use that.
* Make work if built with threading enabledRussell Belfer2013-09-091-0/+4
|
* Only use callbacks when -n or -v in add example.Krzysztof Adamski2013-09-091-4/+4
|
* Move statement after declarations in add example.Krzysztof Adamski2013-09-091-2/+1
|
* Remove unnececery arguments priting in add example.Krzysztof Adamski2013-09-091-3/+0
|
* Better usage info in add example.Krzysztof Adamski2013-09-091-7/+20
|
* Add -u option to add example.Krzysztof Adamski2013-09-091-2/+11
|
* Supported options information in add example.Krzysztof Adamski2013-09-091-1/+1
|
* Adding add example.Krzysztof Adamski2013-09-091-0/+121
|
* Split examples CMakeLists.txtRussell Belfer2013-09-031-0/+14
| | | | | Also, this converts the examples/CMakeLists.txt from explicitly listing to just globbing for all the individual C files.
* Adding credentials callback to ls-remote and fetch too.Krzysztof Adamski2013-09-016-33/+45
|
* Removing unneeded code duplication in ls-remote.cKrzysztof Adamski2013-09-011-33/+7
|
* Improve isolation of new test from user environsRussell Belfer2013-08-161-0/+28
|
* Add example like "git init"Russell Belfer2013-08-162-1/+218
|
* Fix -n bug; default to all ancestorsBrendan Macmillan2013-07-271-3/+4
|
* Add a bunch more features to log exampleRussell Belfer2013-07-101-14/+112
|
* Fix example/log.c pathspec handling of mergesRussell Belfer2013-07-101-32/+92
| | | | | | | This fixes the way the example log program decides if a merge commit should be shown when a pathspec is given. Also makes it easier to use the pathspec API to just check "does a tree match anything in the pathspec" without allocating a match list.
* more examples/log.c bug fixingRussell Belfer2013-07-101-4/+4
|
* fix bug with order args and no revisionRussell Belfer2013-07-101-2/+5
|
* Fix example/log.c minor diffs with git logRussell Belfer2013-07-101-2/+5
|
* Add basic commit formatting to log outputRussell Belfer2013-07-101-3/+55
|
* rev-parse exampleRussell Belfer2013-07-102-1/+107
|
* More progress on log exampleRussell Belfer2013-07-101-62/+146
|
* Extending log example codeRussell Belfer2013-07-101-3/+50
| | | | | | | | | This adds more command line processing to the example version of log. In particular, this adds the funky command line processing that allows an arbitrary series of revisions followed by an arbitrary number of paths and/or glob patterns. The actual logging part still isn't implemented.
* Basic framework for log commandRussell Belfer2013-07-102-1/+59
|
* Fix comment and copyright in exampleRussell Belfer2013-06-201-6/+11
|
* Add example implementation of long format statusRussell Belfer2013-06-201-2/+145
|
* Add status flags to force output sort orderRussell Belfer2013-06-201-1/+2
| | | | | | | | | | | | | | | | Files in status will, be default, be sorted according to the case insensitivity of the filesystem that we're running on. However, in some cases, this is not desirable. Even on case insensitive file systems, 'git status' at the command line will generally use a case sensitive sort (like 'ls'). Some GUIs prefer to display a list of file case insensitively even on case-sensitive platforms. This adds two new flags: GIT_STATUS_OPT_SORT_CASE_SENSITIVELY and GIT_STATUS_OPT_SORT_CASE_INSENSITIVELY that will override the default sort order of the status output and give the user control. This includes tests for exercising these new options and makes the examples/status.c program emulate core Git and always use a case sensitive sort.
* Initial implementation of status exampleRussell Belfer2013-06-202-1/+295
|
* Extend diff exampleRussell Belfer2013-05-171-6/+44
| | | | | Add --raw output format and (some) options to invoke rename/copy detection on the diff.
* Make examples/diff.c compile vs threadsafe libraryRussell Belfer2013-05-161-2/+8
|
* Add cat-file example and increase const use in APIRussell Belfer2013-05-162-1/+230
| | | | | | | | | | | | | | | | This adds an example implementation that emulates git cat-file. It is a convenient and relatively simple example of getting data out of a repository. Implementing this also revealed that there are a number of APIs that are still not using const pointers to objects that really ought to be. The main cause of this is that `git_vector_bsearch` may need to call `git_vector_sort` before doing the search, so a const pointer to the vector is not allowed. However, for tree objects, with a little care, we can ensure that the vector of tree entries is always sorted and allow lookups to take a const pointer. Also, the missing const in commit objects just looks like an oversight.
* Fix trailing whitespacesnulltoken2013-05-151-1/+0
|
* refs: remove the OID/SYMBOLIC filteringCarlos Martín Nieto2013-05-111-1/+1
| | | | | | | | | Nobody should ever be using anything other than ALL at this level, so remove the option altogether. As part of this, git_reference_foreach_glob is now implemented in the frontend using an iterator. Backends will later regain the ability of doing the glob filtering in the backend.
* examples: init the threading systemCarlos Martín Nieto2013-04-231-0/+2
|
* Fix examplesvmg/unified-revisionVicent Marti2013-04-161-9/+11
|
* Merge remote-tracking branch 'ben/unified-revparse' into developmentVicent Marti2013-04-153-14/+16
|\
| * Clean up minor detailsBen Straub2013-04-151-1/+1
| |
| * Clean up example code.Ben Straub2013-04-151-3/+3
| |
| * Change git_revparse to output git_object pointersBen Straub2013-04-152-10/+12
| | | | | | | | This will probably prevent many lookup/free operations in calling code.
| * Add rev-list example to makefilesBen Straub2013-04-091-1/+1
| |
| * Deprecate git_revparse_single and _rangelikeBen Straub2013-04-092-16/+16
| |