项目:pdi-git-plugin
文件:UIGit.java
@Override
public String getAuthorName( String commitId ) {
if ( commitId.equals( IVCS.WORKINGTREE ) ) {
Config config = git.getRepository().getConfig();
return config.get( UserConfig.KEY ).getAuthorName()
+ " <" + config.get( UserConfig.KEY ).getAuthorEmail() + ">";
} else {
RevCommit commit = resolve( commitId );
PersonIdent author = commit.getAuthorIdent();
final StringBuilder r = new StringBuilder();
r.append( author.getName() );
r.append( " <" ); //$NON-NLS-1$
r.append( author.getEmailAddress() );
r.append( ">" ); //$NON-NLS-1$
return r.toString();
}
}
项目:gerrit
文件:GerritPersonIdentProvider.java