From: Junio C Hamano Date: Sat, 17 Apr 2021 08:11:22 GMT Subject: Re: [PATCH v10 2/2] [GSOC] trailer: add new .cmd config option Message-ID: In-Reply-To: ZheNing Hu writes: > But when I am reproducing your solution, I may be in trouble: > If we let shell-script `exit(1)`, `capture_command()` will output > "running trailer command '%s' failed" which is its origin strategy > in order to catch the user's command error. Yes, if we were to take that route, the trailer.c code needs to be taught to conditionally not to pass $1, and capture_command() needs to be taught to conditionally be silent on non-zero exit, as it now is a perfectly sane for the program to exit with non-zero status in some cases (like this one).