]> source.dussan.org Git - jgit.git/commitdiff
CommitGraphWriter: Remove unnecesary progress update call 02/205402/1
authorIvan Frade <ifrade@google.com>
Thu, 9 Nov 2023 22:45:32 +0000 (14:45 -0800)
committerIvan Frade <ifrade@google.com>
Fri, 10 Nov 2023 16:33:00 +0000 (08:33 -0800)
Change [1] reduced the scope of the "writing commit graph" monitoring
task. This left some monitor#update() calls out of any task. When out
of a task, the #update call is a noop.

Delete this update calls as they are noops and misleading.

The affected chunks are usually small and quick to write, so probably
they don't need progress monitoring.

[1] https://git.eclipse.org/r/c/jgit/jgit/+/205339

Change-Id: I74d94e6e44e58816937dc8a84e5a10b340e54e0b

org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/CommitGraphWriter.java

index b697edb60e1f0b6f8cf930057132d17aa2ba03d4..1f1c35ac19ddb59d1e2d9bde446e1f8a266f772f 100644 (file)
@@ -261,7 +261,6 @@ public class CommitGraphWriter {
                for (int n : fanout) {
                        NB.encodeInt32(tmp, 0, n);
                        out.write(tmp, 0, 4);
-                       out.getWriteMonitor().update(1);
                }
        }
 
@@ -272,7 +271,6 @@ public class CommitGraphWriter {
                for (RevCommit c : graphCommits) {
                        c.copyRawTo(tmp, 0);
                        out.write(tmp, 0, hashsz);
-                       out.getWriteMonitor().update(1);
                }
        }
 
@@ -470,7 +468,6 @@ public class CommitGraphWriter {
                                        }
                                        NB.encodeInt32(tmp, 0, edgeValue);
                                        out.write(tmp);
-                                       out.getWriteMonitor().update(1);
                                }
                        }
                }