layout
menu_item
title
description
return_to
sections
default
api
AnnotatedCommit
Version 0.26.1
API Documentation Index
/api/
fromFetchhead
fromRef
fromRevspec
lookup
#id
#ref
#fromFetchhead
#fromRef
#fromRevspec
#lookup
#id
#ref
AnnotatedCommit. fromFetchhead Async
AnnotatedCommit . fromFetchhead ( repo , branch_name , remote_url , id ) . then ( function ( annotatedCommit ) {
// Use annotatedCommit
} ) ;
Parameters
Type
repo
Repository
repository that contains the given commit
branch_name
String
name of the (remote) branch
remote_url
String
url of the remote
id
Oid
the commit object id of the remote branch
AnnotatedCommit. fromRef Async
AnnotatedCommit . fromRef ( repo , ref ) . then ( function ( annotatedCommit ) {
// Use annotatedCommit
} ) ;
Parameters
Type
repo
Repository
repository that contains the given reference
ref
Reference
reference to use to lookup the git_annotated_commit
AnnotatedCommit. fromRevspec Async
AnnotatedCommit . fromRevspec ( repo , revspec ) . then ( function ( annotatedCommit ) {
// Use annotatedCommit
} ) ;
Parameters
Type
repo
Repository
repository that contains the given commit
revspec
String
the extended sha syntax string to use to lookup the commit
AnnotatedCommit. lookup Async
AnnotatedCommit . lookup ( repo , id ) . then ( function ( annotatedCommit ) {
// Use annotatedCommit
} ) ;
Parameters
Type
repo
Repository
repository that contains the given commit
id
Oid
the commit object id to lookup
var oid = annotatedCommit . id ( ) ;
var string = annotatedCommit . ref ( ) ;