Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] Migrating from Jgit 1.0 to 1.1

2011/9/28 Eduardo Falcão <edu.falcao@xxxxxxxxx>
Hi,

Finally I made it work.

Command line:
         $git brach newbranch -t origin/foo

Jgit 1.1 equivalent:
        CreateBranchCommand cbc = GetRepository().branchCreate();
        cbc.setName("newbranch");
        cbc.setStartPoint("origin/foo");
        cbc.setUpstreamMode(SetupUpstreamMode.TRACK);
        cbc.call();

----------------------------------------------------------------------------------------------------

But I think i found a bug in CheckoutCommand. That code:
        CheckoutCommand cc = GetRepository().checkout();
        cc.setName("newbranch");
        cc.setCreateBranch(true);
        cc.setUpstreamMode(SetupUpstreamMode.TRACK);
        cc.setStartPoint("origin/foo");
        cc.call();

This checkout create a new branch tracking a remote, but I opened my repo and typed:
$git config -l
There I could see that a reference from "newbranch" not exists to "origin/foo"

could you file a bug for this problem at 
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=JGit ?

--
Matthias

Back to the top