diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2010-02-02 09:09:26 -0800 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2010-02-02 09:09:26 -0800 |
commit | 784b24dde151a967229c2f8c2f08b0827709bd4d (patch) | |
tree | 19d2084c5a794a4c21e577ef7bc86b1cd5514015 /org.eclipse.jgit.test/tst-rsrc/org/eclipse | |
parent | 434e7884e5b7db7a4314e80c33a3b98f045050b9 (diff) | |
download | jgit-784b24dde151a967229c2f8c2f08b0827709bd4d.tar.gz jgit-784b24dde151a967229c2f8c2f08b0827709bd4d.zip |
Correctly skip over unrecognized optional dircache extensions
We didn't skip the correct number of bytes when we skipped over an
unrecognized but optional dircache extension. We missed skipping
the 8 byte header that makes up the extension's name and length.
We also didn't include the skipped extension's payload as part of
our index checksum, resuting in a checksum failure when the index
was done reading. So ensure we always scan through a skipped
section and include it in the checksum computation.
Add a test case for a currently unsupported index extension, 'ZZZZ',
to verify we can still read the DirCache object even though we
don't know what 'ZZZZ' is supposed to mean.
Bug: 301287
Change-Id: I4bdde94576fffe826d0782483fd98cab1ea628fa
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'org.eclipse.jgit.test/tst-rsrc/org/eclipse')
-rw-r--r-- | org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/gitgit.index.ZZZZ | bin | 0 -> 187 bytes |
-rw-r--r-- | org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/gitgit.index.aaaa | bin | 0 -> 187 bytes |
-rw-r--r-- | org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/gitgit.index.badchecksum | bin | 0 -> 187 bytes |
3 files changed, 0 insertions, 0 deletions
diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/gitgit.index.ZZZZ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/gitgit.index.ZZZZ Binary files differnew file mode 100644 index 0000000000..c931c06fd6 --- /dev/null +++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/gitgit.index.ZZZZ diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/gitgit.index.aaaa b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/gitgit.index.aaaa Binary files differnew file mode 100644 index 0000000000..3f13d61216 --- /dev/null +++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/gitgit.index.aaaa diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/gitgit.index.badchecksum b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/gitgit.index.badchecksum Binary files differnew file mode 100644 index 0000000000..ab0382d9a3 --- /dev/null +++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/test/resources/gitgit.index.badchecksum |