Field updateHead can be a local variable in RefDirectoryRename

Keeping the field updateDate is unecessary, as it is set and used only
in the doRename method.

Change-Id: I1cdd1adf759b75c103480db7a74cec8c2d78b794
Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
This commit is contained in:
Lars Vogel 2021-02-03 11:55:39 +01:00 committed by Matthias Sohn
parent 58f2e23fde
commit 3259a96021
1 changed files with 1 additions and 4 deletions

View File

@ -51,9 +51,6 @@ class RefDirectoryRename extends RefRename {
*/
private ObjectId objId;
/** True if HEAD must be moved to the destination reference. */
private boolean updateHEAD;
/** A reference we backup {@link #objId} into during the rename. */
private RefDirectoryUpdate tmp;
@ -69,7 +66,7 @@ protected Result doRename() throws IOException {
return Result.IO_FAILURE; // not supported
objId = source.getOldObjectId();
updateHEAD = needToUpdateHEAD();
boolean updateHEAD = needToUpdateHEAD();
tmp = refdb.newTemporaryUpdate();
try (RevWalk rw = new RevWalk(refdb.getRepository())) {
// First backup the source so its never unreachable.