git apply and error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux