AccountConfig: Remove unneeded validation of preferred email
AccountConfig was validating the preferred email and generated a validation error if it was invalid, however the validation errors were always ignored and never accessed. Instead the validation of the preferred email is done in AccountValidator. Here the validation only results into an error if the preferred email was changed to an invalid email, but not if the email already was invalid and stayed unchanged. This is something that AccountConfig can't do since it doesn't know about the previous account state. Change-Id: I656a4f405bda44c1a4194439061dc73c3c0bea44 Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
@@ -90,7 +90,7 @@ public class AccountValidator {
|
||||
private Optional<Account> loadAccount(Account.Id accountId, RevWalk rw, ObjectId commit)
|
||||
throws IOException, ConfigInvalidException {
|
||||
rw.reset();
|
||||
AccountConfig accountConfig = new AccountConfig(null, accountId);
|
||||
AccountConfig accountConfig = new AccountConfig(accountId);
|
||||
accountConfig.load(rw, commit);
|
||||
return accountConfig.getLoadedAccount();
|
||||
}
|
||||
|
Reference in New Issue
Block a user