Remove the "save" flag from the PatchListLoader.automerge

The method with the "save" flag was only used from one place and
the flag value was true. Effectively the automerge tree was always
saved.

Change-Id: I7b148fc2364715926e595345bc7299d4fb6d96c0
This commit is contained in:
Saša Živkov
2016-04-08 14:07:23 +02:00
parent 6ed095890a
commit 7351ac04cd

View File

@@ -353,11 +353,6 @@ public class PatchListLoader implements Callable<PatchList> {
public static RevTree automerge(Repository repo, RevWalk rw, RevCommit b,
ThreeWayMergeStrategy mergeStrategy) throws IOException {
return automerge(repo, rw, b, mergeStrategy, true);
}
public static RevTree automerge(Repository repo, RevWalk rw, RevCommit b,
ThreeWayMergeStrategy mergeStrategy, boolean save) throws IOException {
String hash = b.name();
String refName = RefNames.REFS_CACHE_AUTOMERGE
+ hash.substring(0, 2)
@@ -480,12 +475,10 @@ public class PatchListLoader implements Callable<PatchList> {
}
ins.flush();
if (save) {
RefUpdate update = repo.updateRef(refName);
update.setNewObjectId(treeId);
update.disableRefLog();
update.forceUpdate();
}
RefUpdate update = repo.updateRef(refName);
update.setNewObjectId(treeId);
update.disableRefLog();
update.forceUpdate();
return rw.lookupTree(treeId);
}