org.eclipse.jgit.lib.UserConfig的实例源码

项目: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   
@Inject
public GerritPersonIdentProvider(@GerritServerConfig Config cfg) {
  String name = cfg.getString("user",null,"name");
  if (name == null) {
    name = "Gerrit Code Review";
  }
  this.name = name;
  email = cfg.get(UserConfig.KEY).getCommitterEmail();
}

相关文章

买水果
比较全面的redis工具类
gson 反序列化到多态子类
java 版本的 mb_strwidth
JAVA 反转字符串的最快方法,大概比StringBuffer.reverse()性...
com.google.gson.internal.bind.ArrayTypeAdapter的实例源码...