Re: [PATCH 1/1] t1403: prefer test_path_exists helper function
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 4, 2025, 17:44 UTC
- Message-ID
- <xmqqsensr8r9.fsf@gitster.g>
- In-Reply-To
- <CABGrwBBaHzM9tE6vWkuMSZuUbHVWwCZVTgkvMb04C=NYyGCLAw@mail.gmail.com>
Mahendra Dani <danimahendra0904@gmail.com> writes:
Show 5 quoted lines
> Yes, due to the use of the "-f" flag, it's not necessary to explicitly > check the lack of file using `test -e`. > But if we drop the "-f" flag, we will have to check the lack of file > using `test -e` or > `test_path_is_file()`.
Isn't it the other way around?
$ rm -f nosuch ; echo $?
0
$ rm nosuch ; echo $?
rm: cannot remove 'nosuch': No such file or directory
1