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)
Fri, Oct 24, 8:16 AM
Unknown Object (File)
Tue, Oct 21, 7:38 PM
Unknown Object (File)
Sat, Oct 18, 9:46 PM
Unknown Object (File)
Wed, Oct 15, 10:06 PM
Unknown Object (File)
Fri, Oct 3, 8:56 AM
Unknown Object (File)
Tue, Sep 30, 3:00 AM
Unknown Object (File)
Sep 10 2025, 3:27 AM
Unknown Object (File)
Sep 6 2025, 12:21 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 59599
Build 56486: arc lint + arc unit