Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

bc/api updates #8

Closed
wants to merge 50 commits into from

10 participants

@drafnel

This updates api.html for the API changes that have been made since it was originally written.

I think I caught them all, and I think I corrected them correctly, but since I am new to libgit2 everything I wrote should be reviewed carefully. :)

-Brandon

schacon and others added some commits
@schacon schacon initial import e7b004e
@schacon schacon we have write-back now 4cb90af
@schacon schacon internal links 289fc6e
@vmg vmg Add pygit2 to the list of available bindings.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
558b3f7
@vmg vmg Ribbit is now called Rugged.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
e74de62
@vmg vmg Actually, not only the name changed, but also the URL
Signed-off-by: Vicent Marti <tanoku@gmail.com>
8c1285a
@vmg vmg Change the website layout, add more information
Signed-off-by: Vicent Marti <tanoku@gmail.com>
b19da60
@schacon schacon remove objc section for now f728ed1
@mrduncan mrduncan Fix incorrect href for getting started link 6ab1df7
@vmg vmg Fix section margins after each heading
Signed-off-by: Vicent Marti <tanoku@gmail.com>
ea0e063
@schacon schacon start of api guide 5d93066
@schacon schacon raw reading and writing fa0626e
@schacon schacon examples of basic object parsing and write back 887073d
@schacon schacon revwalk beginning b5ae04a
@vmg vmg Merge branch 'anchor-fix' of https://github.com/mrduncan/libgit2.gith… 42b551c
@schacon schacon changed tabs to spaces and added an index section 1f7eee0
@schacon schacon Merge remote branch 'origin/master' 1bf2c77
@schacon schacon update the walker ruby examples cc3e94f
@schacon schacon added libgit2sharp link 0c2b68b
@schacon schacon removed stupid tabs. i hate tabs 486e3e8
@schacon schacon add link to usage guide and fix div for bindings listing 2cc6ff8
@vmg vmg Update API docs
- Added backend documentation
- Fixed misc. issues with outdated API commands

Signed-off-by: Vicent Marti <tanoku@gmail.com>
1d05ac0
@vmg vmg Don't let the navigation buttons be so crammed up
Signed-off-by: Vicent Marti <tanoku@gmail.com>
187d06b
@vmg vmg Add backend examples
Signed-off-by: Vicent Marti <tanoku@gmail.com>
a4602c0
@schacon
Owner

sweet - thanks for doing all of this

schacon and others added some commits
@schacon schacon add back link, fix tabs in api doc, add backend doc to index 5583d6f
@schacon schacon added lua and php bindings links e215c04
@vmg vmg Add Delphi Bindings to the list
Signed-off-by: Vicent Marti <tanoku@gmail.com>
2b8e28d
@vmg vmg Updated features and bindings list
Signed-off-by: Vicent Marti <tanoku@gmail.com>
b3ee372
@vmg vmg Fix links to bindings
Signed-off-by: Vicent Marti <tanoku@gmail.com>
189bb9c
@schacon schacon add go bindings link d31f022
@schacon schacon fix whitespace issues 495ae0d
@schacon schacon update C API examples so they would actually work again f53969e
@schacon schacon point to new rocco files 6c7de9d
@torarnv torarnv Fix spelling of the Qt library 0b675ed
@kevinsawicki kevinsawicki Removing trailing '$' 45c18c9
@vmg vmg Merge pull request #4 from kevinsawicki/patch-1
Removing trailing '$'
887ae7e
@vmg vmg Merge pull request #3 from torarnv/master
Fix spelling of the Qt library
af9029e
@schacon schacon change doc url 0917627
@schacon schacon update all the api links to the new docs 7ee0666
@schacon schacon examples are in the main api docs now 6eb7d45
@carlosmn carlosmn Move instructions to use CMake ca71818
@vmg vmg Merge pull request #5 from carlosmn/master
Move instructions to use CMake
940e580
@dannluciano dannluciano Fix the make dir command. b2404ff
@jdavid jdavid Update pygit2's maintainer 57b2f77
@vmg vmg Merge pull request #7 from jdavid/master
Update pygit2's maintainer
e91429a
@vmg vmg Merge pull request #6 from dannluciano/patch-1
Fix the make dir command.
1862bd9
@drafnel drafnel api.html: fix misspelling of 'where' 2696e63
@drafnel drafnel api.html: update for recent renaming of API functions
git_oid_mkstr --> git_oid_fromstr
git_oid_mkraw --> git_oid_fromraw
git_repository_lookup --> git_object_lookup
git_index_open_inrepo --> git_repository_index
a70537d
@drafnel drafnel api.html: reword paragraph related to free'ing object references
Since git_object_free has been replaced by git_object_close, update this
paragraph so that it describes the behavior and proper usage of
git_object_close.
d41e707
@drafnel drafnel api.html: rework code which used git_commit_message_short, dropped fr…
…om API

The git_commit_message_short function has been dropped from the API.

Implement an alternate way to print out the first line of a commit message.
a952872
@ben

Wow, it's been a while! Well, since http://libgit2.github.com/api.html doesn't exist any more, I'm going to close this out. Thanks anyway! :blush:

@ben ben closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 23, 2010
  1. @schacon

    initial import

    schacon authored
  2. @schacon

    we have write-back now

    schacon authored
  3. @schacon

    internal links

    schacon authored
Commits on Nov 13, 2010
  1. @vmg

    Add pygit2 to the list of available bindings.

    vmg authored
    Signed-off-by: Vicent Marti <tanoku@gmail.com>
Commits on Nov 18, 2010
  1. @vmg

    Ribbit is now called Rugged.

    vmg authored
    Signed-off-by: Vicent Marti <tanoku@gmail.com>
  2. @vmg

    Actually, not only the name changed, but also the URL

    vmg authored
    Signed-off-by: Vicent Marti <tanoku@gmail.com>
Commits on Nov 27, 2010
  1. @vmg

    Change the website layout, add more information

    vmg authored
    Signed-off-by: Vicent Marti <tanoku@gmail.com>
Commits on Nov 29, 2010
  1. @schacon

    remove objc section for now

    schacon authored
Commits on Nov 30, 2010
  1. @mrduncan
Commits on Dec 2, 2010
  1. @vmg

    Fix section margins after each heading

    vmg authored
    Signed-off-by: Vicent Marti <tanoku@gmail.com>
  2. @schacon

    start of api guide

    schacon authored
  3. @schacon

    raw reading and writing

    schacon authored
Commits on Dec 3, 2010
  1. @schacon
  2. @schacon

    revwalk beginning

    schacon authored
Commits on Dec 5, 2010
  1. @vmg
Commits on Dec 7, 2010
  1. @schacon
  2. @schacon
Commits on Dec 8, 2010
  1. @schacon
  2. @schacon

    added libgit2sharp link

    schacon authored
  3. @schacon
  4. @schacon
Commits on Dec 9, 2010
  1. @vmg

    Update API docs

    vmg authored
    - Added backend documentation
    - Fixed misc. issues with outdated API commands
    
    Signed-off-by: Vicent Marti <tanoku@gmail.com>
  2. @vmg

    Don't let the navigation buttons be so crammed up

    vmg authored
    Signed-off-by: Vicent Marti <tanoku@gmail.com>
  3. @vmg

    Add backend examples

    vmg authored
    Signed-off-by: Vicent Marti <tanoku@gmail.com>
  4. @schacon
Commits on Jan 8, 2011
  1. @schacon
  2. @vmg

    Add Delphi Bindings to the list

    vmg authored
    Signed-off-by: Vicent Marti <tanoku@gmail.com>
Commits on Mar 7, 2011
  1. @vmg

    Updated features and bindings list

    vmg authored
    Signed-off-by: Vicent Marti <tanoku@gmail.com>
  2. @vmg

    Fix links to bindings

    vmg authored
    Signed-off-by: Vicent Marti <tanoku@gmail.com>
Commits on Mar 14, 2011
  1. @schacon

    add go bindings link

    schacon authored
  2. @schacon

    fix whitespace issues

    schacon authored
Commits on Mar 27, 2011
  1. @schacon
Commits on Mar 28, 2011
  1. @schacon

    point to new rocco files

    schacon authored
Commits on Apr 4, 2011
  1. @torarnv
Commits on May 7, 2011
  1. @kevinsawicki

    Removing trailing '$'

    kevinsawicki authored
Commits on May 8, 2011
  1. @vmg

    Merge pull request #4 from kevinsawicki/patch-1

    vmg authored
    Removing trailing '$'
  2. @vmg

    Merge pull request #3 from torarnv/master

    vmg authored
    Fix spelling of the Qt library
Commits on Jun 14, 2011
  1. @schacon

    change doc url

    schacon authored
  2. @schacon
Commits on Jun 15, 2011
  1. @schacon
Commits on Jun 18, 2011
  1. @carlosmn
Commits on Jun 19, 2011
  1. @vmg

    Merge pull request #5 from carlosmn/master

    vmg authored
    Move instructions to use CMake
Commits on Jul 3, 2011
  1. @dannluciano

    Fix the make dir command.

    dannluciano authored
Commits on Sep 15, 2011
  1. @jdavid

    Update pygit2's maintainer

    jdavid authored
Commits on Sep 19, 2011
  1. @vmg

    Merge pull request #7 from jdavid/master

    vmg authored
    Update pygit2's maintainer
  2. @vmg

    Merge pull request #6 from dannluciano/patch-1

    vmg authored
    Fix the make dir command.
Commits on Nov 5, 2011
  1. @drafnel
Commits on Nov 7, 2011
  1. @drafnel

    api.html: update for recent renaming of API functions

    drafnel authored
    git_oid_mkstr --> git_oid_fromstr
    git_oid_mkraw --> git_oid_fromraw
    git_repository_lookup --> git_object_lookup
    git_index_open_inrepo --> git_repository_index
  2. @drafnel

    api.html: reword paragraph related to free'ing object references

    drafnel authored
    Since git_object_free has been replaced by git_object_close, update this
    paragraph so that it describes the behavior and proper usage of
    git_object_close.
  3. @drafnel

    api.html: rework code which used git_commit_message_short, dropped fr…

    drafnel authored
    …om API
    
    The git_commit_message_short function has been dropped from the API.
    
    Implement an alternate way to print out the first line of a commit message.
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 5 deletions.
  1. +6 −5 api.html
11 api.html
@@ -255,12 +255,11 @@ <h3 id="commits">Commits</h3>
error = git_commit_lookup(&commit, repo, &oid3);
const git_signature *author, *cmtter;
-const char *message, *message_short;
+const char *message;
time_t ctime;
unsigned int parents, p;
message = git_commit_message(commit);
-message_short = git_commit_message_short(commit);
author = git_commit_author(commit);
cmtter = git_commit_committer(commit);
ctime = git_commit_time(commit);
@@ -314,7 +313,6 @@ <h3 id="commits">Commits</h3>
obj.sha
obj.type
obj.message
-obj.message_short
obj.time
c = obj.committer
@@ -487,10 +485,13 @@ <h2 id="revwalk">Revision Walking</h2>
const char *cmsg;
while ((git_revwalk_next(&oid, walk)) == GIT_SUCCESS) {
+ const char *newline;
error = git_commit_lookup(&wcommit, repo, &oid);
- cmsg = git_commit_message_short(wcommit);
+ cmsg = git_commit_message(wcommit);
+ if (!(newline = strchr(cmsg, '\n')))
+ newline = cmsg + strlen(cmsg);
cauth = git_commit_author(wcommit);
- printf("%s (%s)\n", cmsg, cauth->email);
+ printf("%.*s (%s)\n", newline - cmsg, cmsg, cauth->email);
}
git_revwalk_free(walk);
Something went wrong with that request. Please try again.