I think there's actually a wider problem here. The idea of the withRepoLockCanFail
call is to make a patch index that will speed up the subsequent log operation. So if
log is being called on a different repository to the one in the current directory,
then we're making a patch index in completely the wrong place!
As far as this patch goes, I'm also instinctively nervous about making code too
tolerant of errors - similar to the catchall problems across the codebase, it can
end up hiding genuine problems. In this case I would argue that "CanFail" aspect of
the name should refer to the lock, not the entire call.
So I think it might be better to change log to check the supplied repo and not do
anything if it's remote. On the other hand if it's a choice between this patch and
nothing then we should definitely apply it and fix the regression.
|