diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2023-03-27 11:02:52 +0200 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2023-03-27 11:02:52 +0200 |
commit | a30c1da323768d62a9ce914edc62f4ab195fed26 (patch) | |
tree | de08d6398c74690e65c845dcb12c0574283503e7 /org.eclipse.jgit | |
parent | f9e76d040ee6715003eef69f984afc2ad2772511 (diff) | |
parent | 827849017dc7a6ae269a37727d1e28e18b5aa966 (diff) | |
download | jgit-a30c1da323768d62a9ce914edc62f4ab195fed26.tar.gz jgit-a30c1da323768d62a9ce914edc62f4ab195fed26.zip |
Merge branch 'stable-6.5'
* stable-6.5:
Ensure FileCommitGraph scans commit-graph file if it already exists
Change-Id: I5218ff5214222c7d6d96e452cf427eea1f20c316
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileCommitGraph.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileCommitGraph.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileCommitGraph.java index 3e411a125a..44429a7786 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileCommitGraph.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileCommitGraph.java @@ -85,10 +85,10 @@ public class FileCommitGraph { private final CommitGraph graph; GraphSnapshot(@NonNull File file) { - this(file, FileSnapshot.save(file), null); + this(file, null, null); } - GraphSnapshot(@NonNull File file, @NonNull FileSnapshot snapshot, + GraphSnapshot(@NonNull File file, FileSnapshot snapshot, CommitGraph graph) { this.file = file; this.snapshot = snapshot; @@ -104,7 +104,7 @@ public class FileCommitGraph { // commit-graph file didn't exist return this; } - if (!snapshot.isModified(file)) { + if (snapshot != null && !snapshot.isModified(file)) { // commit-graph file was not modified return this; } |