{"thread":{"id":"52632","subject":"git apply and error","startedAt":"2020-01-14T13:21:37Z","lastAt":"2020-01-14T13:21:37Z","messageCount":1,"participants":["Kim NEVELSTEEN"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"389743","messageId":"c8efd09f-c0a4-57b5-db5c-6a13143ebac0@nevelsteen.com","threadId":"52632","inReplyTo":null,"subject":"git apply and error","fromName":"Kim NEVELSTEEN","fromEmail":"kim@nevelsteen.com","sentAt":"2020-01-14T13:12:03Z","receivedAt":"2020-01-14T13:21:37Z","isPatch":false,"sender":{"key":"kim@nevelsteen.com","avatar":null},"body":"Hello git community.\n\nI have noticed some irregular output with \"git apply\".\n\nWhen including git in a bash script, I noticed that \"git apply\" does not report an error when\nfailing because it is in a git repository.\n\nExample:\nQotD:home$ cd src\nQotD:home/src$ git apply --stat --apply patch\n patch |   26 ++++++++++++++++----------\n 1 file changed, 16 insertions(+), 10 deletions(-)\n\nAgain:\nQotD:home$ git init\nQotD:home$ cd src\nQotD:home/src$ git apply --stat --apply patch\n 0 files changed\n\nThe problem is not that it doesn't work, but that no error is reported.\n\nQotD:mcp940$ git apply --stat --apply patch || echo \"ERROR\"\n<<nothing printed here>>\n\nCheers!\n-KiM\n\n"}]}