Re: [GSoC][PATCH v3 3/3] t3600: use helpers to replace test -d/f/e/s <path>
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Mar 5, 2019, 00:42 UTC
- Message-ID
- <CAPig+cSKOSC+CckNbjr7HahT5jXkp47WuOxbDov_KQi4XNnbQQ@mail.gmail.com>
- In-Reply-To
- <20190304120801.28763-4-rohit.ashiwal265@gmail.com>
On Mon, Mar 4, 2019 at 7:09 AM Rohit Ashiwal <rohit.ashiwal265@gmail.com> wrote:
> Previously we were using `test -(d|f|e|s)` to verify the presence of a > directory/file, but we already have helper functions, viz, `test_path_is_dir`, > `test_path_is_file`, `test_path_is_missing` and `test_file_not_empty` > with better functionality.
As with the commit message of 2/3, many of the words in this message are separated by multiple spaced. Please fold out the excess so there is only a single space between words.
Also, no need to say "previously" since readers know that the patch is changing something. Rewrite in imperative mood:
Take advantage of helper functions test_path_is_dir(),
test_path_is_missing(), etc. to replace `test -d|f|e|s` since the
functions make the code more readable and have better error
messages.> These helper functions make code more readable and informative to someone new, > also these functions have better error messages. > > Signed-off-by: Rohit Ashiwal <rohit.ashiwal265@gmail.com>