Hello git community.
I have noticed some irregular output with "git apply".
When including git in a bash script, I noticed that "git apply" does not report an error when failing because it is in a git repository.
Example: QotD:home$ cd src QotD:home/src$ git apply --stat --apply patch patch | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-)
Again: QotD:home$ git init QotD:home$ cd src QotD:home/src$ git apply --stat --apply patch 0 files changed
The problem is not that it doesn't work, but that no error is reported.
QotD:mcp940$ git apply --stat --apply patch || echo "ERROR" <<nothing printed here>>
Cheers! -KiM