code: public static void validateTaskConditions(GitTask t) {
                  if (t.getIf() != null || t.getUnless() != null) {
                          if (!(t.getIf() == null ^ t.getUnless() == null)) {
                                  throw new GitBuildException("Either if or unless should be specified for a git task.");
                          }
                  }
          }
docs: Validate <code>if</code> and <code>else</code> conditions on a Git task
  
  @param t The git task to check