mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
git merge: don't fail if file content can't be retrieved
The merge button should be disabled in this case, but let's avoid the exception as it is done for other revisions.
This commit is contained in:
@@ -134,7 +134,13 @@ public class GitMergeProvider implements MergeProvider2 {
|
||||
catch (Exception ex) {
|
||||
/// unable to load original revision, use the current instead
|
||||
/// This could happen in case if rebasing.
|
||||
mergeData.ORIGINAL = file.contentsToByteArray();
|
||||
try {
|
||||
mergeData.ORIGINAL = file.contentsToByteArray();
|
||||
}
|
||||
catch (IOException e) {
|
||||
LOG.error(e);
|
||||
mergeData.ORIGINAL = ArrayUtil.EMPTY_BYTE_ARRAY;
|
||||
}
|
||||
}
|
||||
mergeData.CURRENT = loadRevisionCatchingErrors(current);
|
||||
mergeData.LAST = loadRevisionCatchingErrors(last);
|
||||
|
||||
Reference in New Issue
Block a user