Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [egit-dev] Missing CloneCommand

On 2011-01-15 14:37, Matthias Sohn wrote:
2011/1/15 Thomas Hallgren <thomas@xxxxxxx>
Never mind. I just found org.eclipse.jgit.pgm ...

These are the cosole command imlementations.
A draft for the CloneCommand for the Git API is in review at [1].


Cool. I'll change the implementation that I derived from the command once that get's released.

One thing I noted while experimenting was that I wasn't able to do a subsequent pull on the cloned repository unless I added the following to the local config:

[branch "master"]
    remote = origin
    merge = refs/heads/master

It seems to be added by default by my git client when cloning without options so I added this to my code (just after finding the head advertised by the remote):


            dstcfg.setString("branch", "master", "remote", remoteName);
            dstcfg.setString("branch", "master", "merge", branch.getName());
            dstcfg.save();

Perhaps something to consider for inclusion in the CloneCommand ?

- thomas


Back to the top