confused by git diff --exit-code

2012-10-24 Thread Bogolisk
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..000
--- 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..000
--- a/foo.txt
+++ b/foo.txt
/others/foo$ echo $?
0

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Revert option for git add --patch

2012-11-09 Thread Bogolisk
Jonathon Mah jmah at me.com writes:

 
 Nathan,
 
 I find myself performing similar actions to you: using git add -p to stage 
hunks, sometimes editing the
 staged patch; and keeping mental notes of things I wanted to revert, 
 sometimes 
changing them in the editor
 in another window, and sometimes reverting them after the add session with 
 git 
checkout -p).

Other front-ends like Egg and Magit has been providing the ability to move 
hunks 
back and forth, for a long time.

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html