Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2015665

Browse files
committed
Clean up minor details
1 parent 5961d5e commit 2015665

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

examples/diff.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ static int resolve_to_tree(
1717
int err = 0;
1818
git_object *obj = NULL;
1919

20-
if ((err =git_revparse(&obj, NULL, NULL, repo, identifier)) < 0)
20+
if ((err = git_revparse_single(&obj, repo, identifier)) < 0)
2121
return err;
2222

2323
switch (git_object_type(obj)) {

include/git2/revparse.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
GIT_BEGIN_DECL
2222

2323
/**
24-
*
2524
* Find a single object, as specified by a revision string. See `man gitrevisions`,
2625
* or http://git-scm.com/docs/git-rev-parse.html#_specifying_revisions for
2726
* information on the syntax accepted.
@@ -31,8 +30,7 @@ GIT_BEGIN_DECL
3130
* @param spec the textual specification for an object
3231
* @return 0 on success, GIT_ENOTFOUND, GIT_EAMBIGUOUS, GIT_EINVALIDSPEC or an error code
3332
*/
34-
GIT_EXTERN(int) git_revparse_single(git_object **out, git_repository *repo,
35-
const char *spec);
33+
GIT_EXTERN(int) git_revparse_single(git_object **out, git_repository *repo, const char *spec);
3634

3735

3836
/**

include/git2/revwalk.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ GIT_EXTERN(void) git_revwalk_sorting(git_revwalk *walk, unsigned int sort_mode);
221221
*
222222
* The range should be of the form
223223
* <commit>..<commit>
224-
* where each <commit> is in the form accepted by 'git_revparse'.
224+
* where each <commit> is in the form accepted by 'git_revparse_single'.
225225
* The left-hand commit will be hidden and the right-hand commit pushed.
226226
*
227227
* @param walk the walker being used for the traversal

0 commit comments

Comments
 (0)