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
This commit is contained in:
Sergey 2022-12-07 15:49:47 +04:00 committed by Matthias Sohn
parent 64d37a20bd
commit 2b21d9bbb6
1 changed files with 1 additions and 2 deletions

View File

@ -138,8 +138,7 @@ public void writePackedRefs() throws IOException {
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');
}