public PushCommand add(String nameOrSpec) {if (0 <= nameOrSpec.indexOf(':')) {refSpecs.add(new RefSpec(nameOrSpec));} else {Ref src;try {src = repo.findRef(nameOrSpec);} catch (IOException e) {throw new JGitInternalException(JGitText.get().exceptionCaughtDuringExecutionOfPushCommand,e);}if (src != null)add(src);}return this;}
public virtual NGit.Api.PushCommand Add(string nameOrSpec){if (0 <= nameOrSpec.IndexOf(':')){refSpecs.AddItem(new RefSpec(nameOrSpec));}else{Ref src;try{src = repo.GetRef(nameOrSpec);}catch (IOException e){throw new JGitInternalException(JGitText.Get().exceptionCaughtDuringExecutionOfPushCommand, e);}if (src != null){Add(src);}}return this;}