java: public void include(String name, AnyObjectId id) {boolean validRefName = Repository.isValidRefName(name) || Constants.HEAD.equals(name);if (!validRefName)throw new IllegalArgumentException(MessageFormat.format(JGitText.get().invalidRefName, name));if (include.containsKey(name))throw new IllegalStateException(JGitText.get().duplicateRef + name);include.put(name, id.toObjectId());}
C#: public virtual void Include(string name, AnyObjectId id){if (!Repository.IsValidRefName(name)){throw new ArgumentException(MessageFormat.Format(JGitText.Get().invalidRefName, name));}if (include.ContainsKey(name)){throw new InvalidOperationException(JGitText.Get().duplicateRef + name);}include.Put(name, id.ToObjectId());}