# confused by git diff --exit-code

1 messages from 2012-10-24 to 2012-10-24. Participants: Bogolisk.
Thread: https://gitlist.dev/t/31930

## Bogolisk, 2012-10-24 10:33

Subject: confused by git diff --exit-code
Message-ID: <loom.20121024T122128-688@post.gmane.org>
URL: https://gitlist.dev/e/loom.20121024T122128-688%40post.gmane.org

```
With merge conflicts in the work-tree, diff's exit-code seems inconsistent. I 
thought --quiet implied --exit-code


/others/foo$ git diff --quiet
/others/foo$ echo $?
1

/others/foo$ git diff --exit-code
diff --cc foo.txt
index f3dc283,bea67fd..0000000
--- a/foo.txt
+++ b/foo.txt
/others/foo$ echo $?
0

/others/foo$ git diff --cc --quiet
/others/foo$ echo $?
0

/others/foo$ git diff --cc --exit-code
diff --cc foo.txt
index f3dc283,bea67fd..0000000
--- a/foo.txt
+++ b/foo.txt
/others/foo$ echo $?
0

```
