Git Mailing List Archive on lore.kernel.org
 help / color / Atom feed
* git apply and error
@ 2020-01-14 13:12 Kim NEVELSTEEN
  0 siblings, 0 replies; only message in thread
From: Kim NEVELSTEEN @ 2020-01-14 13:12 UTC (permalink / raw)
  To: git

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-14 13:12 git apply and error Kim NEVELSTEEN

Git Mailing List Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/git/0 git/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 git git/ https://lore.kernel.org/git \
		git@vger.kernel.org
	public-inbox-index git

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.git


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git