C# 클래스 GitSharp.Core.RevWalk.RevCommit

A commit reference to a commit in the DAG.
상속: RevObject
파일 보기 프로젝트 열기: jagregory/GitSharp 1 사용 예제들

공개 메소드들

메소드 설명
AsCommit ( RevWalk walk ) : Commit

Parse this commit buffer for display.

DisposeBody ( ) : void
GetFooterLines ( ) : IList

Parse the footer lines (e.g. "Signed-off-by") for machine processing. This method splits all of the footer lines out of the last paragraph of the commit message, providing each line as a key-value pair, ordered by the order of the line's appearance in the commit message itself. A footer line's key must match the pattern {@code ^[A-Za-z0-9-]+:}, while the value is free-form, but must not contain an LF. Very common keys seen in the wild are:

  • {@code Signed-off-by} (agrees to Developer Certificate of Origin)
  • {@code Acked-by} (thinks change looks sane in context)
  • {@code Reported-by} (originally found the issue this change fixes)
  • {@code Tested-by} (validated change fixes the issue for them)
  • {@code CC}, {@code Cc} (copy on all email related to this change)
  • {@code Bug} (link to project's bug tracking system)

GetFooterLines ( FooterKey keyName ) : IList

Get the values of all footer lines with the given key.

GetFooterLines ( string keyName ) : IList

Get the values of all footer lines with the given key.

GetParent ( int nth ) : RevCommit

Get the nth parent from this commit's parent list.

RevCommit ( AnyObjectId id ) : System

Create a new commit reference.

ToString ( ) : string
carry ( GitSharp.Core.RevWalk.RevFlag flag ) : void

Carry a RevFlag set on this commit to its parents. If this commit is parsed, has parents, and has the supplied flag set on it we automatically add it to the parents, grand-parents, and so on until an unparsed commit or a commit with no parents is discovered. This permits applications to force a flag through the history chain when necessary.

carryFlags ( RevCommit c, int carry ) : void
getAuthorIdent ( ) : PersonIdent

Parse the author identity from the raw buffer. This method parses and returns the content of the author line, after taking the commit's character set into account and decoding the author name and email address. This method is fairly expensive and produces a new PersonIdent instance on each invocation. Callers should invoke this method only if they are certain they will be outputting the result, and should cache the return value for as long as necessary to use all information from it. RevFilter implementations should try to use RawParseUtils to scan the RawBuffer instead, as this will allow faster evaluation of commits.

getCommitterIdent ( ) : PersonIdent

Parse the committer identity from the raw buffer. This method parses and returns the content of the committer line, after taking the commit's character set into account and decoding the committer name and email address. This method is fairly expensive and produces a new PersonIdent instance on each invocation. Callers should invoke this method only if they are certain they will be outputting the result, and should cache the return value for as long as necessary to use all information from it. RevFilter implementations should try to use RawParseUtils to scan the RawBuffer instead, as this will allow faster evaluation of commits.

getFullMessage ( ) : string

Parse the complete commit message and decode it to a string. This method parses and returns the message portion of the commit buffer, After taking the commit's character set into account and decoding the buffer using that character set. This method is a fairly expensive operation and produces a new string on each invocation.

getShortMessage ( ) : string

Parse the commit message and return the first "line" of it. The first line is everything up to the first pair of LFs. This is the "oneline" format, suitable for output in a single line display. This method parses and returns the message portion of the commit buffer, after taking the commit's character set into account and decoding the buffer using that character set. This method is a fairly expensive operation and produces a new string on each invocation.

hasLF ( byte r, int b, int e ) : bool
parseCanonical ( RevWalk walk, byte raw ) : void
reset ( ) : void

Reset this commit to allow another RevWalk with the same instances. Subclasses must call base.reset() to ensure the basic information can be correctly cleared out.

비공개 메소드들

메소드 설명
parseBody ( RevWalk walk ) : void
parseHeaders ( RevWalk walk ) : void

메소드 상세

AsCommit() 공개 메소드

Parse this commit buffer for display.
public AsCommit ( RevWalk walk ) : Commit
walk RevWalk /// revision walker owning this reference. ///
리턴 Commit

DisposeBody() 공개 메소드

public DisposeBody ( ) : void
리턴 void

GetFooterLines() 공개 메소드

Parse the footer lines (e.g. "Signed-off-by") for machine processing. This method splits all of the footer lines out of the last paragraph of the commit message, providing each line as a key-value pair, ordered by the order of the line's appearance in the commit message itself. A footer line's key must match the pattern {@code ^[A-Za-z0-9-]+:}, while the value is free-form, but must not contain an LF. Very common keys seen in the wild are:
  • {@code Signed-off-by} (agrees to Developer Certificate of Origin)
  • {@code Acked-by} (thinks change looks sane in context)
  • {@code Reported-by} (originally found the issue this change fixes)
  • {@code Tested-by} (validated change fixes the issue for them)
  • {@code CC}, {@code Cc} (copy on all email related to this change)
  • {@code Bug} (link to project's bug tracking system)
public GetFooterLines ( ) : IList
리턴 IList

GetFooterLines() 공개 메소드

Get the values of all footer lines with the given key.
public GetFooterLines ( FooterKey keyName ) : IList
keyName FooterKey /// footer key to find values of, case insensitive. ///
리턴 IList

GetFooterLines() 공개 메소드

Get the values of all footer lines with the given key.
public GetFooterLines ( string keyName ) : IList
keyName string /// footer key to find values of, case insensitive. ///
리턴 IList

GetParent() 공개 메소드

Get the nth parent from this commit's parent list.
/// An invalid parent index was specified. ///
public GetParent ( int nth ) : RevCommit
nth int /// the specified parent ///
리턴 RevCommit

RevCommit() 공개 메소드

Create a new commit reference.
public RevCommit ( AnyObjectId id ) : System
id AnyObjectId object name for the commit.
리턴 System

ToString() 공개 메소드

public ToString ( ) : string
리턴 string

carry() 공개 메소드

Carry a RevFlag set on this commit to its parents. If this commit is parsed, has parents, and has the supplied flag set on it we automatically add it to the parents, grand-parents, and so on until an unparsed commit or a commit with no parents is discovered. This permits applications to force a flag through the history chain when necessary.
public carry ( GitSharp.Core.RevWalk.RevFlag flag ) : void
flag GitSharp.Core.RevWalk.RevFlag /// The single flag value to carry back onto parents. ///
리턴 void

carryFlags() 공개 정적인 메소드

public static carryFlags ( RevCommit c, int carry ) : void
c RevCommit
carry int
리턴 void

getAuthorIdent() 공개 메소드

Parse the author identity from the raw buffer. This method parses and returns the content of the author line, after taking the commit's character set into account and decoding the author name and email address. This method is fairly expensive and produces a new PersonIdent instance on each invocation. Callers should invoke this method only if they are certain they will be outputting the result, and should cache the return value for as long as necessary to use all information from it. RevFilter implementations should try to use RawParseUtils to scan the RawBuffer instead, as this will allow faster evaluation of commits.
public getAuthorIdent ( ) : PersonIdent
리턴 PersonIdent

getCommitterIdent() 공개 메소드

Parse the committer identity from the raw buffer. This method parses and returns the content of the committer line, after taking the commit's character set into account and decoding the committer name and email address. This method is fairly expensive and produces a new PersonIdent instance on each invocation. Callers should invoke this method only if they are certain they will be outputting the result, and should cache the return value for as long as necessary to use all information from it. RevFilter implementations should try to use RawParseUtils to scan the RawBuffer instead, as this will allow faster evaluation of commits.
public getCommitterIdent ( ) : PersonIdent
리턴 PersonIdent

getFullMessage() 공개 메소드

Parse the complete commit message and decode it to a string. This method parses and returns the message portion of the commit buffer, After taking the commit's character set into account and decoding the buffer using that character set. This method is a fairly expensive operation and produces a new string on each invocation.
public getFullMessage ( ) : string
리턴 string

getShortMessage() 공개 메소드

Parse the commit message and return the first "line" of it. The first line is everything up to the first pair of LFs. This is the "oneline" format, suitable for output in a single line display. This method parses and returns the message portion of the commit buffer, after taking the commit's character set into account and decoding the buffer using that character set. This method is a fairly expensive operation and produces a new string on each invocation.
public getShortMessage ( ) : string
리턴 string

hasLF() 공개 정적인 메소드

public static hasLF ( byte r, int b, int e ) : bool
r byte
b int
e int
리턴 bool

parseCanonical() 공개 메소드

public parseCanonical ( RevWalk walk, byte raw ) : void
walk RevWalk
raw byte
리턴 void

reset() 공개 메소드

Reset this commit to allow another RevWalk with the same instances. Subclasses must call base.reset() to ensure the basic information can be correctly cleared out.
public reset ( ) : void
리턴 void