diff options
author | Zheng Yuting <05zyt30@gmail.com> | 2025-03-26 15:52:45 +0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2025-04-07 14:54:05 -0700 |
commit | ce20dec4a4de8a75cbc9735538c9430e68d3c1f8 (patch) | |
tree | cb0e1b53041549228ab0d7643f72c299aa67ba20 /builtin/commit.c | |
parent | 683c54c999c301c2cd6f715c411407c413b1d84e (diff) |
send-email: capture errors in an eval {} block
Auth relied solely on return values without catching errors. This misjudges
non-credential errors as auth failure without error info.
Patch wraps the entire auth process in an eval {} block to catch
all exceptions, including non-credential errors. It adds a new $error var,
uses 'or do' to prevent flow break, and returns $result ? 1 : 0. And merges
if/else branches, integrates SASL and basic auth, with comments for
future status code handling.
Signed-off-by: Zheng Yuting <05ZYT30@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit.c')
0 files changed, 0 insertions, 0 deletions