Skip to content

Commit d4cd514

Browse files
committed
Update jgit from 7.4 to 7.6.
adjusted RevWalk max flags constant since it diverges from javadoc and added tripwire test in case it changes again in future.
1 parent a349d3f commit d4cd514

18 files changed

Lines changed: 30 additions & 17 deletions

File tree

ide/libs.git/src/org/netbeans/libs/git/jgit/commands/LogCommand.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ public class LogCommand extends GitCommand {
8181
private final boolean fetchBranchInfo;
8282
private static final Logger LOG = Logger.getLogger(LogCommand.class.getName());
8383

84+
/// see RevWalk.newFlag(); note: don't trust the doc! check RevWalk.RESERVED_FLAGS
85+
static final int MAX_REVWALK_FLAGS = 23;
86+
8487
public LogCommand (Repository repository, GitClassFactory gitFactory, SearchCriteria criteria,
8588
boolean fetchBranchInfo, ProgressMonitor monitor, RevisionInfoListener listener) {
8689
super(repository, gitFactory, monitor);
@@ -210,7 +213,7 @@ private void markBranchFlags (Map<String, GitBranch> allBranches, RevWalk walk,
210213
}
211214
} else {
212215
usedFlags.add(flagId);
213-
if (i <= 23) { // leave one spare flag for the run method, see RevWalk.newFlag()
216+
if (i <= MAX_REVWALK_FLAGS - 1) { // leave one spare flag for the run method
214217
i++;
215218
RevFlag flag = walk.newFlag(flagId);
216219
List<GitBranch> branches = new ArrayList<>(allBranches.size());

ide/libs.git/test/unit/src/org/netbeans/libs/git/jgit/commands/LogTest.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
import java.io.File;
2323
import java.io.IOException;
24+
import java.lang.reflect.Field;
2425
import java.util.Date;
2526
import java.util.Map;
2627
import org.eclipse.jgit.api.Git;
@@ -59,6 +60,15 @@ protected void setUp() throws Exception {
5960
repository = getRepository(getLocalGitRepository());
6061
}
6162

63+
// doc promises 24, but the actual number was observed to be lower since 7.5
64+
// this is a tripwire test to detect changes
65+
public void testMaxApplicationFlagCount() throws Exception {
66+
Field field = RevWalk.class.getDeclaredField("RESERVED_FLAGS");
67+
field.setAccessible(true);
68+
int available = 32 - (int) field.get(null);
69+
assertEquals(LogCommand.MAX_REVWALK_FLAGS, available); // if this fails, adjust the value
70+
}
71+
6272
public void testLogRevision () throws Exception {
6373
File f = new File(workDir, "testcat1");
6474
write(f, "initial content");

ide/o.eclipse.jgit.gpg.bc/external/binaries-list

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
# KIND, either express or implied. See the License for the
1515
# specific language governing permissions and limitations
1616
# under the License.
17-
33787FA12A5F0457C2028FA1DA4517AC8EB3DDF7 org.eclipse.jgit:org.eclipse.jgit.gpg.bc:7.4.0.202509020913-r
17+
FD8967B5C67D63796C4665116AFA85F3D0A4D130 org.eclipse.jgit:org.eclipse.jgit.gpg.bc:7.6.0.202603022253-r

ide/o.eclipse.jgit.gpg.bc/external/org.eclipse.jgit.gpg.bc-7.4.0.202509020913-r-license.txt renamed to ide/o.eclipse.jgit.gpg.bc/external/org.eclipse.jgit.gpg.bc-7.6.0.202603022253-r-license.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Name: JGit Library
22
Origin: Eclipse
3-
Version: 7.4.0.202509020913-r
3+
Version: 7.6.0.202603022253-r
44
Description: Integration library for Git client
55
License: EDL-1.0-jgit
66
URL: http://www.eclipse.org/jgit/download/

ide/o.eclipse.jgit.gpg.bc/nbproject/project.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717

1818
is.autoload=true
1919

20-
release.external/org.eclipse.jgit.gpg.bc-7.4.0.202509020913-r.jar=modules/org-eclipse-jgit-gpg-bc.jar
20+
release.external/org.eclipse.jgit.gpg.bc-7.6.0.202603022253-r.jar=modules/org-eclipse-jgit-gpg-bc.jar

ide/o.eclipse.jgit.gpg.bc/nbproject/project.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
<public-packages/>
6666
<class-path-extension>
6767
<runtime-relative-path>org-eclipse-jgit-gpg-bc.jar</runtime-relative-path>
68-
<binary-origin>external/org.eclipse.jgit.gpg.bc-7.4.0.202509020913-r.jar</binary-origin>
68+
<binary-origin>external/org.eclipse.jgit.gpg.bc-7.6.0.202603022253-r.jar</binary-origin>
6969
</class-path-extension>
7070
</data>
7171
</configuration>

ide/o.eclipse.jgit.lfs/external/binaries-list

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
# KIND, either express or implied. See the License for the
1515
# specific language governing permissions and limitations
1616
# under the License.
17-
D47A51B1257A577DB9388386F60953CFB066450C org.eclipse.jgit:org.eclipse.jgit.lfs:7.4.0.202509020913-r
17+
EA88518D6722FA4B3A7BBA8FE8233BC2B22B02C9 org.eclipse.jgit:org.eclipse.jgit.lfs:7.6.0.202603022253-r

ide/o.eclipse.jgit.lfs/external/org.eclipse.jgit.lfs-7.4.0.202509020913-r-license.txt renamed to ide/o.eclipse.jgit.lfs/external/org.eclipse.jgit.lfs-7.6.0.202603022253-r-license.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Name: JGit Library
22
Origin: Eclipse
3-
Version: 7.4.0.202509020913-r
3+
Version: 7.6.0.202603022253-r
44
Description: Integration library for Git client
55
License: EDL-1.0-jgit
66
URL: http://www.eclipse.org/jgit/download/

ide/o.eclipse.jgit.lfs/nbproject/project.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717

1818
is.autoload=true
1919

20-
release.external/org.eclipse.jgit.lfs-7.4.0.202509020913-r.jar=modules/org-eclipse-jgit-lfs.jar
20+
release.external/org.eclipse.jgit.lfs-7.6.0.202603022253-r.jar=modules/org-eclipse-jgit-lfs.jar

ide/o.eclipse.jgit.lfs/nbproject/project.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
<public-packages/>
6161
<class-path-extension>
6262
<runtime-relative-path>org-eclipse-jgit-lfs.jar</runtime-relative-path>
63-
<binary-origin>external/org.eclipse.jgit.lfs-7.4.0.202509020913-r.jar</binary-origin>
63+
<binary-origin>external/org.eclipse.jgit.lfs-7.6.0.202603022253-r.jar</binary-origin>
6464
</class-path-extension>
6565
</data>
6666
</configuration>

0 commit comments

Comments
 (0)