Source:
<code>protected void doGetHtml(HttpServletRequest req, HttpServletResponse res) throws IOException { Repository repo = ServletUtils.getRepository(req); GitilesView view = getView(req, repo); Paginator paginator = newPaginator(repo, view); if (paginator == null) { res.setStatus(SC_NOT_FOUND); return; } try { GitDateFormatter df = new GitDateFormatter(Format.DEFAULT); Map<String, Object> data; List<String> pretty_values = view.getParameters().get(PRETTY_PARAM); if (pretty_values.isEmpty()) { data = new LogSoyData(req, view).toSoyData(paginator, null, df); GitilesConfig.putVariant(getAccess(req).getConfig(), "logEntry", "logEntryVariant", data); } else { data = new LogSoyData(req, view, true).toSoyData(paginator, null, df); <START> String variant = pretty_values.get(0); <END> data.put("logPrettyVariant", pretty_values.get(0)); } if (!view.getRevision().nameIsId()) { List<Map<String, Object>> tags = Lists.newArrayListWithExpectedSize(1); for (RevObject o : RevisionServlet.listObjects(paginator.getWalk(), view.getRevision())) { if (o instanceof RevTag) { tags.add(new TagSoyData(linkifier, req).toSoyData((RevTag) o, df)); } } if (!tags.isEmpty()) { data.put("tags", tags); } } String title = "Log - "; if (view.getOldRevision() != Revision.NULL) { title += view.getRevisionRange(); } else { title += view.getRevision().getName(); } data.put("title", title); renderHtml(req, res, "gitiles.logDetail", data); } catch (RevWalkException e) { log.warn("Error in rev walk", e); res.setStatus(SC_INTERNAL_SERVER_ERROR); return; } finally { paginator.getWalk().release(); } }</code><technical_language>fail if multiple pretty= values instead of first? ambivalent</technical_language>

Target:
protected void doGetHtml(HttpServletRequest req, HttpServletResponse res) throws IOException { Repository repo = ServletUtils.getRepository(req); GitilesView view = getView(req, repo); Paginator paginator = newPaginator(repo, view); if (paginator == null) { res.setStatus(SC_NOT_FOUND); return; } try { GitilesAccess access = getAccess(req); DateFormatter df = new DateFormatter(access, Format.DEFAULT); Map<String, Object> data; List<String> pretty_values = view.getParameters().get(PRETTY_PARAM); if (pretty_values.isEmpty()) { data = new LogSoyData(req, view).toSoyData(paginator, null, df); GitilesConfig.putVariant(access.getConfig(), "logEntry", "logEntryVariant", data); } else { data = new LogSoyData(req, view, true).toSoyData(paginator, null, df); String variant = pretty_values.get(0); data.put("logPrettyVariant", pretty_values.get(0)); } if (!view.getRevision().nameIsId()) { List<Map<String, Object>> tags = Lists.newArrayListWithExpectedSize(1); for (RevObject o : RevisionServlet.listObjects(paginator.getWalk(), view.getRevision())) { if (o instanceof RevTag) { tags.add(new TagSoyData(linkifier, req).toSoyData((RevTag) o, df)); } } if (!tags.isEmpty()) { data.put("tags", tags); } } String title = "Log - "; if (view.getOldRevision() != Revision.NULL) { title += view.getRevisionRange(); } else { title += view.getRevision().getName(); } data.put("title", title); renderHtml(req, res, "gitiles.logDetail", data); } catch (RevWalkException e) { log.warn("Error in rev walk", e); res.setStatus(SC_INTERNAL_SERVER_ERROR); return; } finally { paginator.getWalk().release(); } }