From 2b21d9bbb6c98ff1b0f81df80d0726abf1d0727d Mon Sep 17 00:00:00 2001 From: Sergey Date: Wed, 7 Dec 2022 15:49:47 +0400 Subject: [PATCH] RefWriter#writePackedRefs: Remove a redundant "if" check After checking the variable, the same variable was checked again inside the "if" block, and after the first check, this variable does not change. Remove the second unnecessary check. Change-Id: I6a38e67073f7f93105575b8f415ad32d350af602 --- org.eclipse.jgit/src/org/eclipse/jgit/lib/RefWriter.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefWriter.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefWriter.java index c80d80f607..d2c3f9de68 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefWriter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefWriter.java @@ -138,8 +138,7 @@ public abstract class RefWriter { final StringWriter w = new StringWriter(); if (peeled) { w.write(RefDirectory.PACKED_REFS_HEADER); - if (peeled) - w.write(RefDirectory.PACKED_REFS_PEELED); + w.write(RefDirectory.PACKED_REFS_PEELED); w.write('\n'); } -- 2.39.5