Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ide/c.google.gson/external/binaries-list
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
527175CA6D81050B53BDD4C457A6D6E017626B0E com.google.code.gson:gson:2.11.0
4E773A317740B83B43CFC3D652962856041697CB com.google.code.gson:gson:2.12.1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Name: GSon
Description: JSon serialization/deserialization library
Origin: GitHub
Version: 2.11.0
Version: 2.12.1
License: Apache-2.0

Apache License
Expand Down
2 changes: 1 addition & 1 deletion ide/c.google.gson/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
release.external/gson-2.11.0.jar=modules/com-google-gson.jar
release.external/gson-2.12.1.jar=modules/com-google-gson.jar
is.autoload=true
javac.compilerargs=-Xlint -Xlint:-serial
javac.source=1.8
Expand Down
2 changes: 1 addition & 1 deletion ide/c.google.gson/nbproject/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<public-packages/>
<class-path-extension>
<runtime-relative-path>com-google-gson.jar</runtime-relative-path>
<binary-origin>external/gson-2.11.0.jar</binary-origin>
<binary-origin>external/gson-2.12.1.jar</binary-origin>
</class-path-extension>
</data>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public long getCommitTime () {
if (author == null) {
return (long) revCommit.getCommitTime() * 1000;
} else {
return author.getWhen().getTime();
return author.getWhenAsInstant().toEpochMilli();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,9 @@ private void transferTimestamp (org.eclipse.jgit.api.CommitCommand commit, RevCo
PersonIdent lastAuthor = lastCommit.getAuthorIdent();
if (lastAuthor != null) {
PersonIdent author = commit.getAuthor();
commit.setAuthor(lastAuthor.getTimeZone() == null
? new PersonIdent(author, lastAuthor.getWhen())
: new PersonIdent(author, lastAuthor.getWhen(), lastAuthor.getTimeZone()));
commit.setAuthor(lastAuthor.getZoneId() == null
? new PersonIdent(author, lastAuthor.getWhenAsInstant())
: new PersonIdent(author, lastAuthor.getWhenAsInstant(), lastAuthor.getZoneId()));
}
}

Expand All @@ -197,7 +197,7 @@ private void prepareIndex () throws NoWorkTreeException, CorruptObjectException,
treeWalk.addTree(new DirCacheIterator(cache));
final int T_HEAD = 0;
final int T_INDEX = 1;
List<DirCacheEntry> toAdd = new LinkedList<DirCacheEntry>();
List<DirCacheEntry> toAdd = new LinkedList<>();
while (treeWalk.next() && !monitor.isCanceled()) {
String path = treeWalk.getPathString();
int mHead = treeWalk.getRawMode(T_HEAD);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,11 +310,11 @@ public boolean requiresCommitBody () {
Date from = criteria.getFrom();
Date to = criteria.getTo();
if (from != null && to != null) {
filter = AndRevFilter.create(filter, CommitTimeRevFilter.between(from, to));
filter = AndRevFilter.create(filter, CommitTimeRevFilter.between(from.toInstant(), to.toInstant()));
} else if (from != null) {
filter = AndRevFilter.create(filter, CommitTimeRevFilter.after(from));
filter = AndRevFilter.create(filter, CommitTimeRevFilter.after(from.toInstant()));
} else if (to != null) {
filter = AndRevFilter.create(filter, CommitTimeRevFilter.before(to));
filter = AndRevFilter.create(filter, CommitTimeRevFilter.before(to.toInstant()));
}
// this must be at the end, limit filter must apply as the last
if (criteria.getLimit() != -1) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,13 @@
import org.eclipse.jgit.errors.NotSupportedException;
import org.eclipse.jgit.errors.TransportException;
import org.eclipse.jgit.errors.UnsupportedCredentialItem;
import org.eclipse.jgit.lib.Config;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.storage.file.FileBasedConfig;
import org.eclipse.jgit.transport.CredentialItem;
import org.eclipse.jgit.transport.CredentialsProvider;
import org.eclipse.jgit.transport.RemoteConfig;
import org.eclipse.jgit.transport.Transport;
import org.eclipse.jgit.transport.TransportProtocol;
import org.eclipse.jgit.transport.URIish;
import org.eclipse.jgit.util.FS;
import org.eclipse.jgit.util.SystemReader;
import org.netbeans.libs.git.GitException;
import org.netbeans.libs.git.jgit.GitClassFactory;
Expand Down Expand Up @@ -81,17 +78,17 @@ public boolean get (URIish uriish, CredentialItem... items) throws UnsupportedCr
password = "";
}
for (CredentialItem i : items) {
if (i instanceof CredentialItem.Username) {
((CredentialItem.Username) i).setValue(user);
if (i instanceof CredentialItem.Username un) {
un.setValue(user);
continue;
}
if (i instanceof CredentialItem.Password) {
((CredentialItem.Password) i).setValue(password.toCharArray());
if (i instanceof CredentialItem.Password pw) {
pw.setValue(password.toCharArray());
continue;
}
if (i instanceof CredentialItem.StringType) {
if (i instanceof CredentialItem.StringType st) {
if (i.getPromptText().equals("Password: ")) { //NOI18N
((CredentialItem.StringType) i).setValue(password);
st.setValue(password);
continue;
}
}
Expand Down Expand Up @@ -241,54 +238,22 @@ protected final void handleException (TransportException e, URIish uri) throws G

protected abstract void runTransportCommand () throws GitException;

private static class DelegatingSystemReader extends SystemReader {
private static class DelegatingSystemReader extends SystemReader.Delegate {

private final SystemReader instance;

public DelegatingSystemReader (SystemReader sr) {
super(sr);
this.instance = sr;
}

@Override
public String getHostname () {
return instance.getHostname();
}

@Override
public String getenv (String string) {
if (PROP_ENV_GIT_SSH.equals(string)) {
return null;
}
return instance.getenv(string);
}

@Override
public String getProperty (String string) {
return instance.getProperty(string);
}

@Override
public FileBasedConfig openUserConfig (Config config, FS fs) {
return instance.openUserConfig(config, fs);
}

@Override
public FileBasedConfig openSystemConfig (Config config, FS fs) {
return instance.openSystemConfig(config, fs);
}

@Override
public long getCurrentTime () {
return instance.getCurrentTime();
}

@Override
public int getTimezone (long l) {
return instance.getTimezone(l);
}

@Override
public FileBasedConfig openJGitConfig(Config config, FS fs) {
return instance.openJGitConfig(config, fs);
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@
import java.util.Arrays;
import java.util.Collections;
import java.util.concurrent.atomic.AtomicBoolean;
import org.eclipse.jgit.lib.Config;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.storage.file.FileBasedConfig;
import org.eclipse.jgit.util.FS;
import org.eclipse.jgit.util.SystemReader;
import org.netbeans.junit.Filter;
import org.netbeans.libs.git.GitClient;
Expand Down Expand Up @@ -284,7 +281,7 @@ public char[] getPassphrase (String uri, String prompt) {

public void testSshConnectionGITSSH_Issue213394 () throws Exception {
SystemReader sr = SystemReader.getInstance();
SystemReader.setInstance(new DelegatingSystemReader(sr) {
SystemReader.setInstance(new SystemReader.Delegate(sr) {

@Override
public String getenv (String string) {
Expand Down Expand Up @@ -404,51 +401,4 @@ public char[] getPassphrase (String uri, String prompt) {

}

private static class DelegatingSystemReader extends SystemReader {
private final SystemReader instance;

public DelegatingSystemReader (SystemReader sr) {
this.instance = sr;
}

@Override
public String getHostname () {
return instance.getHostname();
}

@Override
public String getenv (String string) {
return instance.getenv(string);
}

@Override
public String getProperty (String string) {
return instance.getProperty(string);
}

@Override
public FileBasedConfig openUserConfig (Config config, FS fs) {
return instance.openUserConfig(config, fs);
}

@Override
public FileBasedConfig openSystemConfig (Config config, FS fs) {
return instance.openSystemConfig(config, fs);
}

@Override
public long getCurrentTime () {
return instance.getCurrentTime();
}

@Override
public int getTimezone (long l) {
return instance.getTimezone(l);
}

@Override
public FileBasedConfig openJGitConfig(Config config, FS fs) {
return instance.openJGitConfig(config, fs);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -643,9 +643,9 @@ public void testAmendCommit () throws Exception {
new GitUser("user2", "user2.email"), new GitUser("committer2", "committer2.email"), true, NULL_PROGRESS_MONITOR);
RevCommit amendedCommit = walk.parseCommit(repository.resolve(lastCommit.getRevision()));
assertEquals("Commit time should not change after amend", time, lastCommit.getCommitTime());
assertEquals(originalCommit.getAuthorIdent().getWhen(), amendedCommit.getAuthorIdent().getWhen());
assertEquals(originalCommit.getAuthorIdent().getWhenAsInstant(), amendedCommit.getAuthorIdent().getWhenAsInstant());
// commit time should not equal.
assertFalse(originalCommit.getCommitterIdent().getWhen().equals(amendedCommit.getCommitterIdent().getWhen()));
assertFalse(originalCommit.getCommitterIdent().getWhenAsInstant().equals(amendedCommit.getCommitterIdent().getWhenAsInstant()));
statuses = client.getStatus(new File[] { workDir }, NULL_PROGRESS_MONITOR);
assertStatus(statuses, workDir, newOne, true, GitStatus.Status.STATUS_NORMAL, GitStatus.Status.STATUS_NORMAL, GitStatus.Status.STATUS_NORMAL, false);
assertStatus(statuses, workDir, another, true, GitStatus.Status.STATUS_NORMAL, GitStatus.Status.STATUS_NORMAL, GitStatus.Status.STATUS_NORMAL, false);
Expand Down Expand Up @@ -693,7 +693,9 @@ public void testCherryPickCommit () throws Exception {
GitRevisionInfo commit = client.commit(new File[0], info.getFullMessage(), null, null, NULL_PROGRESS_MONITOR);
assertEquals(info.getAuthor(), commit.getAuthor());
assertEquals(info.getCommitTime(), commit.getCommitTime());
assertEquals(Utils.findCommit(repository, info.getRevision()).getAuthorIdent().getWhen(),
Utils.findCommit(repository, commit.getRevision()).getAuthorIdent().getWhen());
assertEquals(
Utils.findCommit(repository, info.getRevision()).getAuthorIdent().getWhenAsInstant(),
Utils.findCommit(repository, commit.getRevision()).getAuthorIdent().getWhenAsInstant()
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

import java.io.File;
import java.io.IOException;
import org.eclipse.jgit.lib.Ref;
import org.eclipse.jgit.lib.ReflogReader;
import org.eclipse.jgit.lib.Repository;
import org.netbeans.libs.git.GitClient;
Expand Down Expand Up @@ -83,7 +84,9 @@ public void testMoveMergeCommit () throws Exception {

GitRefUpdateResult res = client.updateReference("master", info.getRevision(), NULL_PROGRESS_MONITOR);
assertEquals(GitRefUpdateResult.FAST_FORWARD, res);
ReflogReader reflogReader = repository.getReflogReader("master");
Ref ref = repository.findRef("master");
assertNotNull(ref);
ReflogReader reflogReader = repository.getRefDatabase().getReflogReader(ref);
assertEquals("merge " + info.getRevision() + ": Fast-forward", reflogReader.getLastEntry().getComment());
}

Expand All @@ -104,7 +107,9 @@ public void testMoveMergeRef () throws Exception {

GitRefUpdateResult res = client.updateReference("master", "BRANCH", NULL_PROGRESS_MONITOR);
assertEquals(GitRefUpdateResult.FAST_FORWARD, res);
ReflogReader reflogReader = repository.getReflogReader("master");
Ref ref = repository.findRef("master");
assertNotNull(ref);
ReflogReader reflogReader = repository.getRefDatabase().getReflogReader(ref);
assertEquals("merge BRANCH: Fast-forward", reflogReader.getLastEntry().getComment());
}

Expand Down
2 changes: 1 addition & 1 deletion ide/o.eclipse.jgit.gpg.bc/external/binaries-list
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
792FF306EA46E2734624D5C9176BA9C6E092E43C org.eclipse.jgit:org.eclipse.jgit.gpg.bc:7.0.0.202409031743-r
0B53C4CF59B0A52E4E2C43E4FF096BBD8E389B30 org.eclipse.jgit:org.eclipse.jgit.gpg.bc:7.2.0.202503040940-r
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Name: JGit Library
Origin: Eclipse
Version: 7.0.0.202409031743-r
Version: 7.2.0.202503040940-r
Description: Integration library for Git client
License: EDL-1.0-jgit
URL: http://www.eclipse.org/jgit/download/
Expand Down
2 changes: 1 addition & 1 deletion ide/o.eclipse.jgit.gpg.bc/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@

is.autoload=true

release.external/org.eclipse.jgit.gpg.bc-7.0.0.202409031743-r.jar=modules/org-eclipse-jgit-gpg-bc.jar
release.external/org.eclipse.jgit.gpg.bc-7.2.0.202503040940-r.jar=modules/org-eclipse-jgit-gpg-bc.jar
2 changes: 1 addition & 1 deletion ide/o.eclipse.jgit.gpg.bc/nbproject/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<public-packages/>
<class-path-extension>
<runtime-relative-path>org-eclipse-jgit-gpg-bc.jar</runtime-relative-path>
<binary-origin>external/org.eclipse.jgit.gpg.bc-7.0.0.202409031743-r.jar</binary-origin>
<binary-origin>external/org.eclipse.jgit.gpg.bc-7.2.0.202503040940-r.jar</binary-origin>
</class-path-extension>
</data>
</configuration>
Expand Down
2 changes: 1 addition & 1 deletion ide/o.eclipse.jgit.lfs/external/binaries-list
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
95F28CA36011F9CBA2A95C9829B5844CF83D1493 org.eclipse.jgit:org.eclipse.jgit.lfs:7.0.0.202409031743-r
21B6C0D03236D7889C80EBBD6B18FB79246F19D9 org.eclipse.jgit:org.eclipse.jgit.lfs:7.2.0.202503040940-r
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Name: JGit Library
Origin: Eclipse
Version: 7.0.0.202409031743-r
Version: 7.2.0.202503040940-r
Description: Integration library for Git client
License: EDL-1.0-jgit
URL: http://www.eclipse.org/jgit/download/
Expand Down
2 changes: 1 addition & 1 deletion ide/o.eclipse.jgit.lfs/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@

is.autoload=true

release.external/org.eclipse.jgit.lfs-7.0.0.202409031743-r.jar=modules/org-eclipse-jgit-lfs.jar
release.external/org.eclipse.jgit.lfs-7.2.0.202503040940-r.jar=modules/org-eclipse-jgit-lfs.jar
2 changes: 1 addition & 1 deletion ide/o.eclipse.jgit.lfs/nbproject/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
<public-packages/>
<class-path-extension>
<runtime-relative-path>org-eclipse-jgit-lfs.jar</runtime-relative-path>
<binary-origin>external/org.eclipse.jgit.lfs-7.0.0.202409031743-r.jar</binary-origin>
<binary-origin>external/org.eclipse.jgit.lfs-7.2.0.202503040940-r.jar</binary-origin>
</class-path-extension>
</data>
</configuration>
Expand Down
2 changes: 1 addition & 1 deletion ide/o.eclipse.jgit.ssh.jsch/external/binaries-list
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
44AD1B1124EC81AC0ACC2280E27B0239DFFEC41F org.eclipse.jgit:org.eclipse.jgit.ssh.jsch:7.0.0.202409031743-r
D80BF5D740F8A8E4731F75489E6A9226402E6A67 org.eclipse.jgit:org.eclipse.jgit.ssh.jsch:7.2.0.202503040940-r
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Name: JGit Library
Origin: Eclipse
Version: 7.0.0.202409031743-r
Version: 7.2.0.202503040940-r
Description: Integration library for Git client
License: EDL-1.0-jgit
URL: http://www.eclipse.org/jgit/download/
Expand Down
2 changes: 1 addition & 1 deletion ide/o.eclipse.jgit.ssh.jsch/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@

is.autoload=true

release.external/org.eclipse.jgit.ssh.jsch-7.0.0.202409031743-r.jar=modules/org-eclipse-jgit-ssh-jsch.jar
release.external/org.eclipse.jgit.ssh.jsch-7.2.0.202503040940-r.jar=modules/org-eclipse-jgit-ssh-jsch.jar
2 changes: 1 addition & 1 deletion ide/o.eclipse.jgit.ssh.jsch/nbproject/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<public-packages/>
<class-path-extension>
<runtime-relative-path>org-eclipse-jgit-ssh-jsch.jar</runtime-relative-path>
<binary-origin>external/org.eclipse.jgit.ssh.jsch-7.0.0.202409031743-r.jar</binary-origin>
<binary-origin>external/org.eclipse.jgit.ssh.jsch-7.2.0.202503040940-r.jar</binary-origin>
</class-path-extension>
</data>
</configuration>
Expand Down
2 changes: 1 addition & 1 deletion ide/o.eclipse.jgit/external/binaries-list
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
E11135DED2F1F78DA9A028002AD7837CC970EE8E org.eclipse.jgit:org.eclipse.jgit:7.0.0.202409031743-r
8D9379845E9D37B58B187ABBAB2F7A6B63B59F65 org.eclipse.jgit:org.eclipse.jgit:7.2.0.202503040940-r
Loading
Loading