Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] Differences between native git and jgit command line

On Fri, Dec 6, 2013 at 5:18 PM, Axel RICHARD <axel.richard@xxxxxxx> wrote:
Hi,

I tried to execute some tests from shell with native git on one side and jgit on the other side (jgit is the result of the build of jgit.sh).
I found a difference between them with this test :

1. Create file 'a'
2. Add & Commit
3. Create branch 'br1'
4. Replace file 'a' (Rm 'a') by symlink 'a'
5. Add & Commit
6. Checkout branch 'br1'

-> The checkout raises an error with jgit, but not with native git.

-> The first difference seems to happened from the add of the symlink.

Indeed, from one side, after the git add, here is the result of a git status and then a jgit status :
xxxxx:~/testGit$ git add a
xxxxx:~/testGit$ git status
# On branch master
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#    typechange: a
#
xxxxx:~/testGit$ ../jgit status
# On branch master
# Changes to be committed:
#
#     modified:   a
#
# Changes not staged for commit:
#
#     modified:   a

and from the other side, after the jgit add, here is the result of a jgit status and then a git status :
xxxxx:~/testJGit$ ../jgit add a
xxxxx:~/testJGit$ ../jgit status
# On branch master
# Changes to be committed:
#
#     modified:   a
#
# Changes not staged for commit:
#
#     modified:   a
xxxxx:~/testJGit$ git status
# On branch master
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#    modified:   a
#
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#    typechange: a
#

Why, in the case of jgit add, there is a change to be committed and a change not staged for commit, while in the case of git there is only a change to be committed (typechange) ?

Did you try this based on Robin's change series introducing symlink support for jgit ?
Which jgit commit did you try ?

--
Matthias

Back to the top