JGit - What are all these entries in DirCache? [message #652674] |
Sat, 05 February 2011 06:44 |
m0 Messages: 11 Registered: August 2010 |
Junior Member |
|
|
Hello,
I am trying to understand why I have all these entries when I do the following:
git.add().addFilePattern("src/Test.java").call();
git.add().addFilePattern("src/test/Test.java").call();
git.commit().setMessage("Uploading Test Cases");
git.push().call();
DirCache dc = db.readDirCache();
for (int i = 0; i < dc.getEntryCount(); i++) {
DirCacheEntry entry = dc.getEntry(0);
log.debug(entry.getPathString());
}
The result of that is the following:
2011-02-05 01:17:22,444 13764055 DEBUG [GitService] conf/foo.conf
2011-02-05 01:17:22,444 13764055 DEBUG [GitService] conf/foo.conf
2011-02-05 01:17:22,444 13764055 DEBUG [GitService] conf/foo.conf
2011-02-05 01:17:22,444 13764055 DEBUG [GitService] conf/foo.conf
2011-02-05 01:17:22,444 13764055 DEBUG [GitService] conf/foo.conf
2011-02-05 01:17:22,444 13764055 DEBUG [GitService] conf/foo.conf
2011-02-05 01:17:22,444 13764055 DEBUG [GitService] conf/foo.conf
2011-02-05 01:17:22,444 13764055 DEBUG [GitService] conf/foo.conf
2011-02-05 01:17:22,444 13764055 DEBUG [GitService] conf/foo.conf
2011-02-05 01:17:22,444 13764055 DEBUG [GitService] conf/foo.conf
2011-02-05 01:17:22,444 13764055 DEBUG [GitService] conf/foo.conf
2011-02-05 01:17:22,444 13764055 DEBUG [GitService] conf/foo.conf
2011-02-05 01:17:22,444 13764055 DEBUG [GitService] conf/foo.conf
2011-02-05 01:17:22,444 13764055 DEBUG [GitService] conf/foo.conf
2011-02-05 01:17:22,444 13764055 DEBUG [GitService] conf/foo.conf
2011-02-05 01:17:22,444 13764055 DEBUG [GitService] conf/foo.conf
2011-02-05 01:17:22,444 13764055 DEBUG [GitService] conf/foo.conf
2011-02-05 01:17:22,444 13764055 DEBUG [GitService] conf/foo.conf
2011-02-05 01:17:22,444 13764055 DEBUG [GitService] conf/foo.conf
2011-02-05 01:17:22,444 13764055 DEBUG [GitService] conf/foo.conf
2011-02-05 01:17:22,444 13764055 DEBUG [GitService] conf/foo.conf
2011-02-05 01:17:22,444 13764055 DEBUG [GitService] conf/foo.conf
2011-02-05 01:17:22,444 13764055 DEBUG [GitService] conf/foo.conf
2011-02-05 01:17:22,444 13764055 DEBUG [GitService] conf/foo.conf
As you see, I get all those repeated messages as well as all the attributes in each entries are the same.
My git status:
$ git status
# On branch master
nothing to commit (working directory clean)
And my last commit:
$ git log -1
commit 788426c11fb21d733c0eafaebe09f1aec84f1203
Author: Mohamed Mansour
Date: Sat Feb 5 01:17:22 2011 -0500
Uploading Test Cases
My question is, is this a known problem/bug with JGit? I am trying to use the DirCache to figure out if my files has been "git added" correctly, but the only thing I get are conf/foo.conf files and nothing else. That happens every time.
As well, I have noticed that JGit can push an empty change list (no files), is that intentional?
Thanks in advance!
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02973 seconds