aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test
Commit message (Collapse)AuthorAgeFilesLines
...
* | | PackInserterTest: Prevent potential NPE dereferencing Path.getFileName()David Pursehouse2017-12-081-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Path.getFileName() may return null if the path has zero elements. Enclose the dereference in a null-check. Change-Id: I7ea3d3f07edc13a80b593d28e8fd512a4e1ed56b Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | Specify consistent version range for junit in OSGi manifestsDavid Pursehouse2017-12-081-5/+5
|/ / | | | | | | | | | | | | | | | | | | There are several different version ranges specified in the various manifest files. Align them all to the same range: [4.12,5.0.0) Change-Id: I02205b8b8546c9f53ed431b5fd9abf6ddcda4423 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | Use constants from StandardCharsets instead of hard-coded stringsDavid Pursehouse2017-12-0724-216/+185
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of hard-coding the charset strings "US-ASCII", "UTF-8", and "ISO-8859-1", use the corresponding constants from StandardCharsets. UnsupportedEncodingException is not thrown when the StandardCharset constants are used, so remove the now redundant handling. Because the encoding names are no longer hard-coded strings, also remove redundant $NON-NLS warning suppressions. Also replace existing usages of the constants with static imports. Change-Id: I0a4510d3d992db5e277f009a41434276f95bda4e Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | ConfigTest: Move pathToString to FileUtilsDavid Pursehouse2017-12-062-10/+3
| | | | | | | | | | | | | | | | | | | | | | ConfigTest#pathToString is not visible to FileBasedConfigTest when bulding with bazel. Move it to FileUtils rather than messing about with the bazel build rules to make it visible. Change-Id: Idcfd4822699dac9dc4a426088a929a9cd31bf53f Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | FileBasedConfig: support for relative includesMarc Strapetz2017-12-042-3/+84
| | | | | | | | | | | | | | | | | | Relative include.path are now resolved against the config's parent directory. include.path starting with ~/ are resolved against the user's home directory Change-Id: I91911ef404126618b1ddd3589294824a0ad919e6 Signed-off-by: Marc Strapetz <marc.strapetz@syntevo.com>
* | ConfigTest: fix on WindowsMarc Strapetz2017-12-041-4/+12
| | | | | | | | | | Change-Id: I37a2ef611aef97faf1b891a9660c1745435a915d Signed-off-by: Marc Strapetz <marc.strapetz@syntevo.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Make local assert methods private in test classesDavid Pursehouse2017-12-013-6/+6
| | | | | | | | | | Change-Id: I1bed28a1eac3c7f84cc40841853b9540c72be265 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | Merge branch 'stable-4.9'Matthias Sohn2017-11-301-0/+106
|\| | | | | | | | | | | | | | | | | * stable-4.9: GC: Delete stale temporary packs and indexes Change-Id: I49b37845ee8a465404b801a2d8de0205a2e7ba30 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| * GC: Delete stale temporary packs and indexesHector Caballero2017-11-241-0/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a GC operation is interrupted, temporary packs and indexes can be left on the pack folder. In big, busy repositories this can lead to significant amounts of wasted disk space if this interruption is done with a certain frequency. Remove stale temporary packs and indexes at the end of the GC process so they do not accumulate. To avoid interfering with a possible concurrent JGit GC process in the same repository, only delete temporary files that are older than one day. Change-Id: If9b6c1e57fac8a6a0ecc0a703089634caba4caae Signed-off-by: Hector Caballero <hector.caballero@ericsson.com>
* | Break down DfsBlockCache stats by pack file extension.Minh Thai2017-11-272-5/+6
| | | | | | | | | | Change-Id: Iaecf0580279b33e3e2439784528cae7b69fb28bc Signed-off-by: Minh Thai <mthai@google.com>
* | Merge branch 'stable-4.9'Matthias Sohn2017-11-241-1/+11
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.9: Ignore warning for minor version change without API change Silence boxing warning Prepare 4.5.5-SNAPSHOT builds JGit v4.5.4.201711221230-r Fix LockFile semantics when running on NFS Honor trustFolderStats also when reading packed-refs Prepare 4.5.4-SNAPSHOT builds JGit v4.5.3.201708160445-r Change-Id: Icc33d2e36f140e8714fce088379673a8834ae9de
| * Ignore warning for minor version change without API changeMatthias Sohn2017-11-241-1/+11
| | | | | | | | | | | | | | | | - this is a new warning option in Eclipse 4.7 and higher - we always change version of all bundles in a release to keep release engineering simple Change-Id: Ic7523d77b67b2802f1bab3bc70af250d712a034f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Merge branch 'stable-4.9'David Pursehouse2017-11-221-2/+1
|\| | | | | | | | | | | | | | | * stable-4.9: Yet another work-around for a Jsch bug: timeouts Change-Id: I7cf227c62a3c06f91cee1a6c61719b6fe50da883 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| * Yet another work-around for a Jsch bug: timeoutsThomas Wolf2017-11-201-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Jsch 0.1.54 passes on the values from ~/.ssh/config for "ServerAliveInterval" and "ConnectTimeout" as read from the config file to java.net.Socket.setSoTimeout(). That method expects milliseconds, but the values in the config file are seconds! The missing conversion in Jsch means that the timeout is set way too low, and if the server doesn't respond within that very short time frame, Jsch kills the connection and then throws an exception with a message such as "session is down" or "timeout in waiting for rekeying process". As a work-around, do the conversion to milliseconds in the Jsch-facing Config interface of OpenSshConfig. That way Jsch already gets these values as milliseconds. Bug: 526867 Change-Id: Ibc9b93f7722fffe10f3e770dfe7fdabfb3b97e74 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | Config: Handle leading/trailing single whitespacesDave Borowitz2017-11-201-0/+52
| | | | | | | | Change-Id: I468106acd2006d0a174c76dfd4bce231f1c7a6f8
* | Merge changes from topic 'includeDeletes'Shawn Pearce2017-11-161-0/+102
|\ \ | | | | | | | | | | | | | | | * changes: Add flag for keeping ref tombstones in GC reftable Preserve ref tombstone when compact top retable stack
| * | Add flag for keeping ref tombstones in GC reftableMinh Thai2017-11-151-0/+102
| | | | | | | | | | | | | | | | | | | | | | | | A tombstone will prevent a delayed reference update from resurrecting the deleted reference. Change-Id: Id9f4df43d435a299ff16cef614821439edef9b11 Signed-off-by: Minh Thai <mthai@google.com>
* | | Remove unused import from ReftableCompactorTestMatthias Sohn2017-11-151-1/+0
|/ / | | | | | | Change-Id: Ib6d7fb6b56a94be307b07fefacf5d9c77fce0447 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Merge "ObjectDirectory: Add pack directory getter"David Pursehouse2017-11-146-9/+8
|\ \
| * | ObjectDirectory: Add pack directory getterHector Caballero2017-11-146-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far, in order to get the pack directory it was necessary to resolve it from the object directory. This resolution is already done when creating the object directory, so simplify the call by just adding a getter to the pack directory. Change-Id: I69e783141dc6739024e8b3d5acc30843edd651a7 Signed-off-by: Hector Caballero <hector.caballero@ericsson.com>
* | | Merge "ReftableCompactor should accept 0 for minUpdateIndex"Jonathan Nieder2017-11-141-0/+326
|\ \ \ | |/ / |/| |
| * | ReftableCompactor should accept 0 for minUpdateIndexMinh Thai2017-11-141-0/+326
| | | | | | | | | | | | | | | | | | | | | | | | Do not use 0 as the unset value for minUpdateIndex, as input reftables may have minUpdateIndex starting at 0. Change-Id: Ie040a6b73d4a5eba5521e51d0ee4580713c84a3e Signed-off-by: Minh Thai <mthai@google.com>
* | | FileUtils.toPath to convert File to PathMarc Strapetz2017-11-141-1/+2
|/ / | | | | | | | | | | | | | | | | | | | | When invoking File.toPath(), an (unchecked) InvalidPathException may be thrown which should be converted to a checked IOException. For now, we will replace File.toPath() by FileUtils.toPath() only for code which can already handle IOExceptions. Change-Id: I0f0c5fd2a11739e7a02071adae9a5550985d4df6 Signed-off-by: Marc Strapetz <marc.strapetz@syntevo.com>
* | Remove an unused import from PackParserTestMatthias Sohn2017-11-111-1/+0
| | | | | | | | Change-Id: I4182a1746b09dedab648e457d1ece6d667a01f12 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Merge changes I22a8874b,I68ed4abd,I740bc4bf,Icbd17d15Jonathan Nieder2017-11-101-11/+94
|\ \ | | | | | | | | | | | | | | | | | | | | | * changes: BitmapWalker: do not revisit objects in bitmap Use bitmaps for non-commit reachability checks Make PackWriterBitmapWalker public UploadPackTest: construct commits in test method
| * | Use bitmaps for non-commit reachability checksJonathan Tan2017-11-101-0/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, unless RequestPolicy#ANY is used, UploadPack rejects all non-commit "want" lines unless they were advertized. This is fine, except when "uploadpack.allowreachablesha1inwant" is true (corresponding to RequestPolicy#REACHABLE_COMMIT), in which case one would expect that "want"-ing anything reachable would work. (There is no restriction that "want" lines must only contain commits - it is allowed for refs to directly point to trees and blobs, and requesting for them using "want" lines works.) This commit has been written to avoid performance regressions as much as possible. In the usual (and currently working) case where the only unadvertized things requested are commits, we do a standard RevWalk in order to avoid incurring the cost of loading bitmaps. However, if unadvertized non-commits are requested, bitmaps are used instead, and if there are no bitmaps, a WantNotValidException is thrown (as is currently done). Change-Id: I68ed4abd0e477ff415c696c7544ccaa234df7f99 Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
| * | UploadPackTest: construct commits in test methodJonathan Tan2017-11-011-11/+7
| | | | | | | | | | | | | | | | | | | | | | | | In a subsequent commit, more tests will be added. This commit allows those tests to reuse fields. Change-Id: Icbd17d158cfe3ba4dacbd8a11a67f9e7607b41b3 Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
* | | Reject pack if delta exceeds array size limitShawn Pearce2017-11-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | JGit's delta handling code requires the target to be a single byte array. Any attempt to inflate a delta larger than fits in the 2GiB limit will fail with some form of array index exceptions. Check for this overflow early and abort pack parsing. Change-Id: I5bb3a71f1e4f4e0e89b8a177c7019a74ee6194da
* | | Suppress "Unlikely argument type for equals()" warnings in testsDavid Pursehouse2017-11-063-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This new warning was introduced in Eclipse 4.7 Oxygen [1]. The only instances of the warning are in test code that is asserting that some class does not compare equal to Strings. As in the Gerrit project [2] these asserts are arguably overkill, but arguably also a reasonable test of an equals implementation. Ignore the warning in these cases. Note that if the project is opened in an earlier version of Eclipse, a warning "Unsupported @SuppressWarnings" will be emitted. [1] https://www.eclipse.org/eclipse/news/4.7/M6/ [2] https://gerrit-review.googlesource.com/#/c/gerrit/+/110339/ Change-Id: I08ea33d71e6009cf0f37e6492a475931f447256b Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | Merge branch 'stable-4.9'David Pursehouse2017-11-021-0/+539
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.9: PackInserter: Implement newReader() Move some strings from DfsText to JGitText FileRepository: Add pack-based inserter implementation ObjectDirectory: Factor a method to close open pack handles ObjectDirectory: Remove last modified check in insertPack Change-Id: Ifc9ed6f5d8336bc978818a64eae122bceb933e5d
| * | PackInserter: Implement newReader()Dave Borowitz2017-11-011-1/+119
| | | | | | | | | | | | Change-Id: Ib9e7f6439332eaed3d936f895a5271a7d514d3e9
| * | FileRepository: Add pack-based inserter implementationDave Borowitz2017-11-011-0/+421
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Applications that use ObjectInserters to create lots of individual objects may prefer to avoid cluttering up the object directory with loose objects. Add a specialized inserter implementation that produces a single pack file no matter how many objects. This inserter is loosely based on the existing DfsInserter implementation, but is simpler since we don't need to buffer blocks in memory before writing to storage. An alternative for such applications would be to write out the loose objects and then repack just those objects later. This operation is not currently supported with the GC class, which always repacks existing packs when compacting loose objects. This in turn requires more CPU-intensive reachability checks and extra I/O to copy objects from old packs to new packs. So, the choice was between implementing a new variant of repack, or not writing loose objects in the first place. The latter approach is likely less code overall, and avoids unnecessary I/O at runtime. The current implementation does not yet support newReader() for reading back objects. Change-Id: I2074418f4e65853b7113de5eaced3a6b037d1a17
* | | Revert "Throw BinaryBlobException from RawParseUtils#lineMap."Han-Wen NIenhuys2017-10-242-19/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit f2e64cd895a6aa4f18ab3b876f13b7814fb98f04. The newly added throws clause breaks backward compatibility. Change-Id: Ifa76a1b95935e52640b81cd53c171eb17da175c2 Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
* | | Throw BinaryBlobException from RawParseUtils#lineMap.Han-Wen Nienhuys2017-10-242-9/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | This makes detection of binaries exact for ResolveMerger and DiffFormatter: they will classify files as binary regardless of where the '\0' occurs in the text. Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Change-Id: Id4342a199628d9406bfa04af1b023c27a47d4014
* | | Avoid loading and merging binary data in ResolveMergerHan-Wen Nienhuys2017-10-241-0/+142
| | | | | | | | | | | | | | | Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Change-Id: Ide4b68872d426aa262142f224acf636c776b35d3
* | | Introduce RawText#load.Han-Wen Nienhuys2017-10-241-0/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | This method creates a RawText from a blob, but avoids reading the blob if the start contains null bytes. This should reduce the amount of garbage that Gerrit produces for changes with binaries. Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Change-Id: Idd202d20251f2d1653e5f1ca374fe644c2cf205f
* | | Merge branch 'stable-4.9'David Pursehouse2017-10-231-10/+15
|\| | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.9: Avoid bad rounding "1 year, 12 months" in date formatter Ensure that ~ in ssh config is replaced before Jsch sees it Change-Id: If6ca55f9447aaea3d7c2d36c03520d5e6dd5193e Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| * | Avoid bad rounding "1 year, 12 months" in date formatterMichael Keppler2017-10-231-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Round first, then calculate the labels. This avoids "x years, 12 months" and instead produces "x+1 years". One test case has been added for the original example the bug was found with, and one assertion has been moved from an existing test case to the new test case, since it also triggered the bug. Bug: 525907 Change-Id: I3270af3850c4fb7bae9123a0a6582f93055c9780 Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | Ensure that ~ in ssh config is replaced before Jsch sees itThomas Wolf2017-10-181-10/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do tilde replacement for values from the ssh config file that are file names in all cases to make sure that they are already replaced when Jsch tries to get the values. Previously, OpenSshConfig did tilde replacement only for the IdentityFile in the JGit-facing "Host" interface and left the replacement in the Jsch-facing "Config" interface to Jsch. But on Windows the JGit notion of what should be used to replace the tilde differs from Jsch's replacement. Jsch always replaces the tilde by the value of the system property "user.home", whereas JGit also considers some environment variables like %HOME%. This can lead to rather surprising failures as in the case of bug 526175 where %HOME% != user.home. Prior to commit 9d24470 (i.e.,prior to JGit 4.9.0) this problem never occurred because Jsch was completely unaware of the ssh config file and all host and IdentityFile handling happened exclusively in JGit. Bug: 526175 Change-Id: I1511699664ffea07cb58ed751cfdb79b15e3a99e Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
| * | Prepare 4.9.1-SNAPSHOT buildsMatthias Sohn2017-10-082-47/+47
| | | | | | | | | | | | | | | Change-Id: Ic49fd093d3fe4324c4d83aba74033040fcaa37a6 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * | JGit v4.9.0.201710071750-rv4.9.0.201710071750-rMatthias Sohn2017-10-072-2/+2
| | | | | | | | | | | | | | | Change-Id: I487f6aa3d0c4ef1d57f91cdc36177d994ae24c51 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | dfs: Switch InMemoryRepository to DfsReftableDatabaseShawn Pearce2017-10-181-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ensure DfsReftableDatabase is tested by the same test suites that use/test InMemoryRepository. It also simplifies the logic of InMemoryRepository and brings its compatibility story closer to any other DFS repository that uses reftables for its reference storage. Change-Id: I881469fd77ed11a9239b477633510b8c482a19ca Signed-off-by: Minh Thai <mthai@google.com> Signed-off-by: Terry Parker <tparker@google.com>
* | | Merge changes from topic 'reftable'Terry Parker2017-10-181-1/+2
|\ \ \ | | | | | | | | | | | | | | | | | | | | * changes: dfs: reftable backed DfsRefDatabase Support symbolic references in ReceiveCommand
| * | | Support symbolic references in ReceiveCommandShawn Pearce2017-10-181-1/+2
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow creating symbolic references with link, and deleting them or switching to ObjectId with unlink. How this happens is up to the individual RefDatabase. The default implementation detaches RefUpdate if a symbolic reference is involved, supporting these command instances on RefDirectory. Unfortunately the packed-refs file does not support storing symrefs, so atomic transactions involving more than one symref command are failed early. Updating InMemoryRepository is deferred until reftable lands, as I plan to switch InMemoryRepository to use reftable for its internal storage representation. Change-Id: Ibcae068b17a2fc6d958f767f402a570ad88d9151 Signed-off-by: Minh Thai <mthai@google.com> Signed-off-by: Terry Parker <tparker@google.com>
* / | Avoid bad rounding "1 year, 12 months" in date formatterMichael Keppler2017-10-181-1/+8
|/ / | | | | | | | | | | | | | | | | | | | | | | | | Round first, then calculate the labels. This avoids "x years, 12 months" and instead produces "x+1 years". One test case has been added for the original example the bug was found with, and one assertion has been moved from an existing test case to the new test case, since it also triggered the bug. Bug: 525907 Change-Id: I3270af3850c4fb7bae9123a0a6582f93055c9780 Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* / Prepare 4.10.0-SNAPSHOT buildsMatthias Sohn2017-10-082-47/+47
|/ | | | | Change-Id: I5ca462d1db18a2c5c9382cfb9c83972510fa2b88 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Use a new RevWalk for validating not advertised wantsZhen Chen2017-10-051-0/+90
| | | | | | | | | | | | | | Shadow commits in the RevWalk in the UploadPack object may cause the UNINTERESTING flag not being carried over to their parents commits since they were marked NO_PARENTS during the assumeShallow or initializeShallowCommits call. A new RevWalk needs to be created for this reason, but instead of creating a new RevWalk from Repository, we can reuse the ObjectReader in the RevWalk of UploadPack to load objects. Change-Id: Ic3fee0512d35b4f555c60e696a880f8b192e4439 Signed-off-by: Zhen Chen <czhen@google.com>
* ReflogWriter: Align auto-creation defaults with C gitDave Borowitz2017-09-301-10/+11
| | | | | | | | | | Per git-config(1), core.logAllRefUpdates auto-creates reflogs for HEAD and for refs under heads, notes, tags, and for HEAD. Add notes and remove stash from ReflogWriter#shouldAutoCreateLog. Explicitly force writing reflogs for refs/stash at call sites, now that this is supported. Change-Id: I3a46d2c2703b7c243e0ee2bbf6948279800c485c
* Support force writing reflog on a per-update basisDave Borowitz2017-09-302-6/+75
| | | | | | | | | | Even if a repository has core.logAllRefUpdates=true, ReflogWriter does not create reflog files unless the refs are under a hard-coded list of prefixes, or unless the forceWrite bit is set. Expose the forceWrite bit on a per-update basis in RefUpdate/BatchRefUpdate/ReceiveCommand, creating RefLogWriters as necessary. Change-Id: Ifc851fba00f76bf56d4134f821d0576b37810f80
* Ensure ReflogWriter only works with a RefDirectoryDave Borowitz2017-09-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | The ReflogWriter constructor just took a Repository and called getDirectory() on it to figure out the reflog dirs, but not all Repository instances use this storage format for reflogs, so it's incorrect to attempt to use ReflogWriter when there is not a RefDirectory directly involved. In practice, ReflogWriter was mostly only used by the implementation of RefDirectory, so enforcing this is mostly just shuffling around calls in the same internal package. The one exception is StashDropCommand, which writes to a reflog lock file directly. This was a reasonable implementation decision, because there is no general reflog interface in JGit beyond using (Batch)RefUpdate to write new entries to the reflog. So to implement "git stash drop <N>", which removes an arbitrary element from the reflog, it's fair to fall back to the RefDirectory implementation. Creating and using a more general interface is well beyond the scope of this change. That said, the old behavior of writing out the reflog file even if that's not the reflog format used by the given Repository is clearly wrong. Fail fast in this case instead. Change-Id: I9bd4b047bc3e28a5607fd346ec2400dde9151730