List<String> (boolean takeAllUsers, boolean allBranches) { List<String> hashes = new ArrayList<>(); hashes.add(last(repo)); GitTestUtil.setupUsername(myProject, "bob.smith", "bob.smith@example.com"); if (takeAllUsers) { String commitByBob = tac(repo, "file.txt"); hashes.add(commitByBob); } GitTestUtil.setupDefaultUsername(myProject); hashes.add(tac(repo, "file1.txt")); git("checkout -b feature"); String commitOnlyInFeature = tac(repo, "file2.txt"); hashes.add(commitOnlyInFeature); git("checkout master"); String commitOnlyInMaster = tac(repo, "master.txt"); if (allBranches) hashes.add(commitOnlyInMaster); Collections.reverse(hashes); refresh(); return hashes; }