Source:
<code>private void testFetchFromOrigin(boolean useRemote) throws Exception { Activator.getDefault().getRepositoryUtil().addConfiguredRepository( clonedRepositoryFile); Activator.getDefault().getRepositoryUtil().addConfiguredRepository( clonedRepositoryFile2); Repository repository = lookupRepository(clonedRepositoryFile2); repository.getConfig().setString("remote", "origin", "push", "refs/heads/*:refs/heads/*"); repository.getConfig().save(); SWTBotTree tree = getOrOpenView().bot().tree(); String destinationString = clonedRepositoryFile.getParentFile() .getName() + " - " + "origin"; String dialogTitle = NLS.bind(UIText.FetchResultDialog_title, destinationString); selectNode(tree, useRemote, true); runFetch(tree); SWTBotShell confirm = bot.shell(dialogTitle); assertEquals("Wrong result tree row count", 0, confirm.bot().tree() .rowCount()); confirm.close(); deleteAllProjects(); shareProjects(clonedRepositoryFile2); String objid = <START> repository.findRef("refs/heads/master").getTarget() <END> .getObjectId().name(); objid = objid.substring(0, 7); touchAndSubmit(null); PushOperationUI op =new PushOperationUI(repository, "origin", false); op.start(); String pushdialogTitle = NLS.bind(UIText.PushResultDialog_title, op.getDestinationString()); bot.shell(pushdialogTitle).close(); deleteAllProjects(); refreshAndWait(); selectNode(tree, useRemote, true); runFetch(tree); confirm = bot.shell(dialogTitle); SWTBotTreeItem[] treeItems = confirm.bot().tree().getAllItems(); boolean found = false; for (SWTBotTreeItem item : treeItems) { found = item.getText().contains(objid); if (found) break; } assertTrue(found); confirm.close(); selectNode(tree, useRemote, true); runFetch(tree); confirm = bot.shell(dialogTitle); assertEquals("Wrong result tree row count", 0, confirm.bot().tree() .rowCount()); }</code><technical_language>exactRef</technical_language>

Target:
private void testFetchFromOrigin(boolean useRemote) throws Exception { Activator.getDefault().getRepositoryUtil().addConfiguredRepository( clonedRepositoryFile); Activator.getDefault().getRepositoryUtil().addConfiguredRepository( clonedRepositoryFile2); Repository repository = lookupRepository(clonedRepositoryFile2); repository.getConfig().setString("remote", "origin", "push", "refs/heads/*:refs/heads/*"); repository.getConfig().save(); SWTBotTree tree = getOrOpenView().bot().tree(); String destinationString = clonedRepositoryFile.getParentFile() .getName() + " - " + "origin"; String dialogTitle = NLS.bind(UIText.FetchResultDialog_title, destinationString); selectNode(tree, useRemote, true); runFetch(tree); SWTBotShell confirm = bot.shell(dialogTitle); assertEquals("Wrong result tree row count", 0, confirm.bot().tree() .rowCount()); confirm.close(); deleteAllProjects(); shareProjects(clonedRepositoryFile2); String objid = repository.exactRef("refs/heads/master").getTarget() .getObjectId().name(); objid = objid.substring(0, 7); touchAndSubmit(null); PushOperationUI op =new PushOperationUI(repository, "origin", false); op.start(); String pushdialogTitle = NLS.bind(UIText.PushResultDialog_title, op.getDestinationString()); bot.shell(pushdialogTitle).close(); deleteAllProjects(); refreshAndWait(); selectNode(tree, useRemote, true); runFetch(tree); confirm = bot.shell(dialogTitle); SWTBotTreeItem[] treeItems = confirm.bot().tree().getAllItems(); boolean found = false; for (SWTBotTreeItem item : treeItems) { found = item.getText().contains(objid); if (found) break; } assertTrue(found); confirm.close(); selectNode(tree, useRemote, true); runFetch(tree); confirm = bot.shell(dialogTitle); assertEquals("Wrong result tree row count", 0, confirm.bot().tree() .rowCount()); }