This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 196837
Collapse All | Expand All

(-)libs.git/test/unit/src/org/netbeans/libs/git/jgit/commands/MergeTest.java (+18 lines)
Lines 45-51 Link Here
45
import java.io.File;
45
import java.io.File;
46
import java.io.IOException;
46
import java.io.IOException;
47
import java.util.Arrays;
47
import java.util.Arrays;
48
import org.eclipse.jgit.lib.ConfigConstants;
48
import org.eclipse.jgit.lib.Constants;
49
import org.eclipse.jgit.lib.Constants;
50
import org.eclipse.jgit.lib.StoredConfig;
49
import org.netbeans.libs.git.GitBranch;
51
import org.netbeans.libs.git.GitBranch;
50
import org.netbeans.libs.git.GitClient;
52
import org.netbeans.libs.git.GitClient;
51
import org.netbeans.libs.git.GitException;
53
import org.netbeans.libs.git.GitException;
Lines 312-315 Link Here
312
            assertEquals(Arrays.asList(new String[] { f.getName(), f2.getName() }), Arrays.asList(ex.getConflicts()));
314
            assertEquals(Arrays.asList(new String[] { f.getName(), f2.getName() }), Arrays.asList(ex.getConflicts()));
313
        }
315
        }
314
    }
316
    }
317
    
318
    public void testMergeBranchNoHeadYet_196837 () throws Exception {
319
        StoredConfig cfg = getRemoteRepository().getConfig();
320
        cfg.setBoolean(ConfigConstants.CONFIG_CORE_SECTION, null, ConfigConstants.CONFIG_KEY_BARE, false);
321
        cfg.save();
322
        File otherRepo = getRemoteRepository().getWorkTree();
323
        File original = new File(otherRepo, "f");
324
        GitClient clientOtherRepo = getClient(otherRepo);
325
        write(original, "initial content");
326
        clientOtherRepo.add(new File[] { original }, ProgressMonitor.NULL_PROGRESS_MONITOR);
327
        clientOtherRepo.commit(new File[] { original }, "initial commit", null, null, ProgressMonitor.NULL_PROGRESS_MONITOR);
328
        
329
        GitClient client = getClient(workDir);
330
        client.fetch(otherRepo.toURI().toString(), Arrays.asList(new String[] { "+refs/heads/master:refs/remotes/origin/master" }), ProgressMonitor.NULL_PROGRESS_MONITOR);
331
        client.merge("origin/master", ProgressMonitor.NULL_PROGRESS_MONITOR);
315
}
332
}
333
}

Return to bug 196837