Reindex empty file list if no base could be found
This allows these changes to be indexed but with no files. This should not really be a problem since gerrit doesn't show any files for these changes in the UI either. Change-Id: Icc46f4462f32fc37b84236e86791331f89347f15
This commit is contained in:
@@ -380,14 +380,13 @@ public class Reindex extends SiteProgram {
|
||||
List<ChangeData> cds = Lists.newArrayList(byId.get(bCommit));
|
||||
try {
|
||||
RevTree aTree = aFor(bCommit, walk);
|
||||
if (aTree == null) {
|
||||
return;
|
||||
}
|
||||
DiffFormatter df = new DiffFormatter(DisabledOutputStream.INSTANCE);
|
||||
try {
|
||||
df.setRepository(repo);
|
||||
if (!cds.isEmpty()) {
|
||||
List<String> paths = getPaths(df.scan(aTree, bTree));
|
||||
List<String> paths = (aTree != null)
|
||||
? getPaths(df.scan(aTree, bTree))
|
||||
: Collections.<String>emptyList();
|
||||
Iterator<ChangeData> cdit = cds.iterator();
|
||||
for (ChangeData cd ; cdit.hasNext(); cdit.remove()) {
|
||||
cd = cdit.next();
|
||||
|
||||
Reference in New Issue
Block a user