Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] CommitCommand -uno option

On Thu, Aug 18, 2016 at 8:38 AM, Amit Kumar <amit.kumar@xxxxxxxxxxxxxx> wrote:
Hi All,

In git commit or git status commands, by using -uno option we can ignore untracked files. Please help me in understanding how to add this option using CommitCommand or StatusCommand.


Option -uno isn't available directly on StatusCommand and CommitCommand.
Though it is available on status commaond in JGit command line interface (see class org.eclipse.jgit.pgm.Status).

You can implement this option on your own:

StatusCommand.call() returns a Status object. Use this Status object to identify the changes you want
to commit. Stage these changes using AddCommand and then run CommitCommand to commit the
staged changes.

-Matthias

Back to the top