Page MenuHomeFreeBSD

git-arc: Fix find_author() for external users
ClosedPublic

Authored by jlduran on Sep 25 2024, 5:44 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 22, 6:33 AM
Unknown Object (File)
Nov 29 2025, 6:16 AM
Unknown Object (File)
Nov 27 2025, 6:56 PM
Unknown Object (File)
Nov 27 2025, 2:37 AM
Unknown Object (File)
Nov 11 2025, 5:40 AM
Unknown Object (File)
Nov 10 2025, 10:48 PM
Unknown Object (File)
Nov 10 2025, 8:21 PM
Unknown Object (File)
Nov 10 2025, 3:51 PM
Subscribers
None

Details

Summary

When an external user submits a review in Phabricator, the find_author()
subroutine may receive the author_name and author_addr as "null" from
the JSON API with git-arc patch.

This "null" string gets tested for length by "[ -n", and returning that
is greater than zero, in other words, the shell does not understand that
"null" means nothing in this case.

Fix it by adding a guard, that sets an empty string when the content is
"null".

While here, standardize the indentation style for find_author()

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable