Skip to main content

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

Thanks for your reply, but I am actually looking to use this option to reduce the git status and git commit time from some code that uses jgit library and does a commit using CommitCommand.

So, I actually tried to do update the git configs using the command "git config status.showUntrackedFiles no". When I print the StoredConfig being used by the jgit library it does print this config as well showing as:

//more configs

status.showuntrackedfiles=no

//more configs

So, is it actually using this config while doing git status and git commit using StatusCommand and CommitCommand ?

Actually, I am facing some speed issue in jgit, a single commit is taking around 5-6 seconds.

Regards

On Thu, Aug 18, 2016 at 2:41 PM, Matthias Sohn <matthias.sohn@xxxxxxxxx> wrote:
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