Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jgit-dev] add -u removes sub-module directories

I clone a repository from GitHub that contains a submodule.

The submodule '' is represented as an empty directory in the working directory of the clone. So far so good. Now I do the following:

 Git git = new Git(repository);

I don't expect any changes, but for some reason there is one. I can see it using the command line git:

$ git status
# On branch master
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#    deleted:

This isn't correct, and it doesn't happen when I do the same operation using the command line git:

$ git reset --hard
$ git add -u .
$ git status
# On branch master
nothing to commit (working directory clean)

So a jgit correspondence to "git add -u ." is different in that it removes the directory that tracks the submodule. Is this a known issue with jgit?

I'm currently using jgit

Thomas Hallgren

Back to the top