Skip to main content

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

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) ?

Thank you in advance

--
Axel RICHARD

begin:vcard
fn:Axel RICHARD
n:RICHARD;Axel
org:Obeo
adr;quoted-printable:BP 20773 - ESPACE PERFORMANCE LA FLEURIAYE;;7, boulevard Amp=C3=A8re;CARQUEFOU;;44481;FRANCE
email;internet:axel.richard@xxxxxxx
title:Eclipse Modeling Consultant
tel;work:02.51.13.82.14
url:http://www.obeo.fr
version:2.1
end:vcard


Back to the top