]> source.dussan.org Git - jgit.git/commit
CommitGraphWriter: throw exception on unknown chunk 61/204061/2
authorIvan Frade <ifrade@google.com>
Fri, 1 Sep 2023 18:25:50 +0000 (11:25 -0700)
committerIvan Frade <ifrade@google.com>
Fri, 1 Sep 2023 18:39:40 +0000 (11:39 -0700)
commit13c8dacae55b8719d228b303570c369231f7c1c1
treebb2f51ec7c1eeaefef8e54bfb8fec04723f99b9d
parent2be8bf2b37177256e5183f26b7ccd13e104daf5f
CommitGraphWriter: throw exception on unknown chunk

CommitGraphWriter first defines the chunks and then writes them. If at
write time a chunk is unknown, it is ignored. This is brittle: if
somebody adds a chunk to the header but not to the actual writing, the
commit-graph is broken and there is no error reported anywhere.

Throw exception if at write time a chunk is unknown. This can only
happen by a coding error in the writer.

Change-Id: Iade677bb6ce368b6941b75a21c622917afa3b751
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/CommitGraphWriter.java