Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » JGit git-status equivalent
JGit git-status equivalent [message #662128] Tue, 29 March 2011 13:09 Go to next message
No real name is currently offline No real nameFriend
Messages: 2
Registered: March 2011
Junior Member
Is there a JGit equivalent to the git status bash command?

In my application i need to get a list of all my untracked files, and maybe the modified ones, like the list you get from "git status".

Any tips on how to solve this?
Re: JGit git-status equivalent [message #662136 is a reply to message #662128] Tue, 29 March 2011 13:34 Go to previous messageGo to next message
Christian Halstrick is currently offline Christian HalstrickFriend
Messages: 269
Registered: July 2009
Senior Member
A few days back the Status command has been introduced http://egit.eclipse.org/r/#change,2890. Use it like this:

Git git=new Git(repo);
Status status=git.status().call();
for (String modified:status.getModified())
  System.out.println("Modified file: "+modified);


Ciao
Chris
Re: JGit git-status equivalent [message #662140 is a reply to message #662128] Tue, 29 March 2011 13:45 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 2
Registered: March 2011
Junior Member
The Status class cant be found in my org.eclipse.jgit.api-package. I have JGit version 0.10.1, downloaded through a dependency in a maven pom.xml file. How do I get the new files in that patch into my maven-repository?

[Updated on: Tue, 29 March 2011 14:34]

Report message to a moderator

Re: JGit git-status equivalent [message #662221 is a reply to message #662128] Tue, 29 March 2011 18:34 Go to previous message
Manuel Doninger is currently offline Manuel DoningerFriend
Messages: 119
Registered: October 2010
Senior Member
You need the nightly build of jgit (https://hudson.eclipse.org/hudson/job/jgit/)
Previous Topic:ERROR occured when Building JGit using Maven
Next Topic:Lockfile Error while importing repository
Goto Forum:
  


Current Time: Fri Apr 03 11:09:00 GMT 2020

Powered by FUDForum. Page generated in 0.06377 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top