Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] how to use the logcommand?

2011/8/23 Jill Singer <jsinger@xxxxxxxxxxx>
Dear JGit Developers-
 
I've been scouring the web, and I have not been able to find a working example of how to use the log command.
 
I have this code: (the file points to a current git checkout/clone).
 
if I navigate to that directory, and type "git log", I get output that makes sense.
 
when I run this code, it triggers the nohead exception:

no head exception :

org.eclipse.jgit.api.errors.NoHeadException: No HEAD exists and no explicit starting revision was specified
 
my questions are:
 
1) how do I get the log information?
2) how do I set switches (like -n for the number of logs) to the log command?

did you look at the jgit test cases for this ? Start looking here:
org.eclipse.jgit.api.CommitAndLogCommandTests 

--
Matthias

Back to the top