Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] Clone and commit another git repository while working in a git repository.

Please reduce your test case further to just the usage of JGit APIs if you believe there is a problem with JGit. 

Sent from my iPhat 6

On 25 Jun 2015, at 08:42, Mahesh Chinthaka <maheshc@xxxxxxxx> wrote:

Hi Sohn,

Sorry about that. Sample code can be found in [1].

I have described my scenario above, and Im using Jgit. Inside my above mentioned methods , its using Jgit code for clonning, and committing and pushing. 



On Thu, Jun 25, 2015 at 1:01 PM, Matthias Sohn <matthias.sohn@xxxxxxxxx> wrote:
On Thu, Jun 25, 2015 at 7:46 AM, Mahesh Chinthaka <maheshc@xxxxxxxx> wrote:
Hi all,

Im using Jgit.
My source code is in github, so I have cloned it in to a local directory and I run my sample code from there.

What my sample code does is clone another git repository to a temp directory in my local machine and do some changes and commit it and push it.


When the commit happens it happens not to the temporary cloned one, instead of that its commiting to my working directory which has my sample source code.

 Following is my code,

GitAgent gitAgent = new JGitAgent();
RepositoryClient client = new GitRepositoryClient(gitAgent);

client.init(adminUserName,password);
client.retireveMetadata(repoURL, false, workDir);
client.commitLocally("Committing POM file updates.", true, workDir);
client.pushLocalCommits(repoURL, "master", workDir);


Am I missing anything here ? Any help would be much appreciated.

none of these classes comes from JGit so how should we know ?

-Matthias 



--
Mahesh Chinthaka Vidanagama | Software Engineer
WSO2, Inc lean. enterprise. middleware.
#20, Palm Grove, Colombo 03, Sri Lanka
Mobile: +94 71 63 63 083 | Work: +94 112 145 345 
Email: maheshc@xxxxxxxx 
Web: www.wso2.com
_______________________________________________
jgit-dev mailing list
jgit-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jgit-dev

Back to the top