Source:
<code>private void display() throws Failure { final PrintWriter stdout = toPrintWriter(out); TreeMap<String, TreeNode> treeMap = null; <START> if (showTree) { <END> treeMap = new TreeMap<String, TreeNode>(); } try { for (final Project p : db.projects().all()) { if (p.getNameKey().equals(wildProject)) { continue; } final ProjectState e = projectCache.get(p.getNameKey()); if (e == null) { continue; } final ProjectControl pctl = e.controlFor(currentUser); if (!showTree) { if (!pctl.isVisible()) { continue; } if (showBranch != null) { final Ref ref = getBranchRef(p.getNameKey()); if (ref == null || ref.getObjectId() == null || !pctl.controlForRef(ref.getLeaf().getName()).isVisible()) { continue; } stdout.print(ref.getObjectId().name()); stdout.print(' '); } stdout.print(p.getName()); stdout.println(); } else { TreeNode node = new TreeNode(p, pctl.isVisible()); treeMap.put(p.getName(), node); } } if (showTree && treeMap.size() > 0) { final List<TreeNode> sortedNodes = new ArrayList<TreeNode>(); for(final TreeNode key : treeMap.values()) { final String parentName = key.getParentName(); if (parentName != null) { final TreeNode node = (TreeNode)treeMap.get((String)parentName); node.addChild(key); } else { sortedNodes.add(key); } } final TreeNode fakeRoot = new TreeNode(null, sortedNodes, false); printElement(stdout, fakeRoot, -1, false, sortedNodes.get(sortedNodes.size() - 1)); } } catch (OrmException e) { throw new Failure(1, "fatal: database error", e); } finally { stdout.flush(); } }</code><technical_language>Please add a conditional check for showTree && showBranch != null alert user options compatible abort command running further</technical_language>

Target:
private void display() throws Failure { if (showTree && (showBranch != null)) { throw new UnloggedFailure(1, "fatal: --tree and --show-branch options are not compatible."); } final PrintWriter stdout = toPrintWriter(out); TreeMap<String, TreeNode> treeMap = null; if (showTree) { treeMap = new TreeMap<String, TreeNode>(); } try { for (final Project p : db.projects().all()) { if (p.getNameKey().equals(wildProject)) { continue; } final ProjectState e = projectCache.get(p.getNameKey()); if (e == null) { continue; } final ProjectControl pctl = e.controlFor(currentUser); if (!showTree) { if (!pctl.isVisible()) { continue; } if (showBranch != null) { final Ref ref = getBranchRef(p.getNameKey()); if (ref == null || ref.getObjectId() == null || !pctl.controlForRef(ref.getLeaf().getName()).isVisible()) { continue; } stdout.print(ref.getObjectId().name()); stdout.print(' '); } stdout.print(p.getName() + "\n"); } else { treeMap.put(p.getName(), new TreeNode(p, pctl.isVisible())); } } if (showTree && treeMap.size() > 0) { final List<TreeNode> sortedNodes = new ArrayList<TreeNode>(); for (final TreeNode key : treeMap.values()) { final String parentName = key.getParentName(); if (parentName != null) { final TreeNode node = treeMap.get((String)parentName); if (node != null) { node.addChild(key); } else { sortedNodes.add(key); } } else { sortedNodes.add(key); } } final TreeNode fakeRoot = new TreeNode(null, sortedNodes, false); printElement(stdout, fakeRoot, -1, false, sortedNodes.get(sortedNodes.size() - 1)); stdout.flush(); } } catch (OrmException e) { throw new Failure(1, "fatal: database error", e); } finally { stdout.flush(); } }