Re: git 1.8.0.rc0.18.gf84667d trouble with git commit -p file

2012-10-11 Thread Junio C Hamano
Conrad Irwin conrad.ir...@gmail.com writes: -i:: --include:: - Before making a commit out of staged contents so far, - stage the contents of paths given on the command line - as well. This is usually not what you want unless you - are concluding a conflicted merge. +

Re: git 1.8.0.rc0.18.gf84667d trouble with git commit -p file

2012-10-10 Thread Conrad Irwin
On Sat, Oct 6, 2012 at 12:07 PM, Jeff King p...@peff.net wrote: Are you sure? Does --only mean only the changes I am about to mark or only the paths I am about to tell you about? Without partial hunk selection (i.e., commit -p), they were the same; a path you mention is a path which will be

Re: git 1.8.0.rc0.18.gf84667d trouble with git commit -p file

2012-10-07 Thread Junio C Hamano
Jeff King p...@peff.net writes: Yes. The more we talk about it, the more turned off I am by the idea. Above I posed my questions as what _should_ we do when And I still think we _should_ default to --only with interactive, if we can find sane semantics. But until we can find them, it

Re: git 1.8.0.rc0.18.gf84667d trouble with git commit -p file

2012-10-07 Thread Jeff King
On Sun, Oct 07, 2012 at 01:51:21PM -0700, Junio C Hamano wrote: Jeff King p...@peff.net writes: Yes. The more we talk about it, the more turned off I am by the idea. Above I posed my questions as what _should_ we do when And I still think we _should_ default to --only with

Re: git 1.8.0.rc0.18.gf84667d trouble with git commit -p file

2012-10-07 Thread Junio C Hamano
Jeff King p...@peff.net writes: On Sun, Oct 07, 2012 at 01:51:21PM -0700, Junio C Hamano wrote: Jeff King p...@peff.net writes: Which is obviously one of: 1. Keep defaulting to --include, as that is what we have been doing. 2. Forbid the cases where it would matter (i.e., when

Re: git 1.8.0.rc0.18.gf84667d trouble with git commit -p file

2012-10-07 Thread Jeff King
On Sun, Oct 07, 2012 at 03:23:31PM -0700, Junio C Hamano wrote: Yeah, I agree with the reasoning. This is an unessential feature that is with the problem for a long time, so let's go the route #1 first before we do anything else. OK. I think Conrad's patch takes us most of the way

Re: git 1.8.0.rc0.18.gf84667d trouble with git commit -p file

2012-10-06 Thread Junio C Hamano
Jeff King p...@peff.net writes: Actually, I am not sure that thread or feature is to blame. Certainly it would have been an opportune time to notice the problem. But this issue goes back much further for git commit --interactive, which has always assumed -i rather than -o. This even predates

Re: git 1.8.0.rc0.18.gf84667d trouble with git commit -p file

2012-10-06 Thread Jeff King
On Fri, Oct 05, 2012 at 11:26:47PM -0700, Junio C Hamano wrote: In the case of add/commit --interactive, it is much more clear what state the index is in when the command gave interactive control to the user. The short-cut add/commit -p interface, however, does not give you an access to its

Re: git 1.8.0.rc0.18.gf84667d trouble with git commit -p file

2012-10-06 Thread Junio C Hamano
Jeff King p...@peff.net writes: Another option is to leave it with -i semantics in the meantime, which are at least easy to explain: it is simply a shorthand for running git add -p git commit. That may be inconsistent with other aspects of commit, but people have (apparently) been happy with

Re: git 1.8.0.rc0.18.gf84667d trouble with git commit -p file

2012-10-06 Thread Jeff King
On Sat, Oct 06, 2012 at 11:22:50AM -0700, Junio C Hamano wrote: Jeff King p...@peff.net writes: Another option is to leave it with -i semantics in the meantime, which are at least easy to explain: it is simply a shorthand for running git add -p git commit. That may be inconsistent with

Re: git 1.8.0.rc0.18.gf84667d trouble with git commit -p file

2012-10-06 Thread Jeff King
On Sat, Oct 06, 2012 at 11:32:51AM -0700, Conrad Irwin wrote: I think I messed up sending somehow: Thanks for resending. What state should the add -p interaction start from for path F? Should you be picking from a patch between the state you previously git added to the index and the

git 1.8.0.rc0.18.gf84667d trouble with git commit -p file

2012-10-05 Thread Horst H. von Brand
What I did: - New file images/coins.asy ~~- 'git add images/coins.asy' - Started adding new stuff to fg.tex - Noticed a old bug in fg.tex, fixed that one - Did 'git -pm Some message' and selected just the bugfix But git created a commit _including_ the new file. Tried to go back: - 'git reset

Re: git 1.8.0.rc0.18.gf84667d trouble with git commit -p file

2012-10-05 Thread Frans Klaver
On Fri, 05 Oct 2012 16:20:45 +0200, Horst H. von Brand vonbr...@inf.utfsm.cl wrote: What I did: - New file images/coins.asy ~~- 'git add images/coins.asy' - Started adding new stuff to fg.tex - Noticed a old bug in fg.tex, fixed that one - Did 'git -pm Some message' and selected just the

Re: git 1.8.0.rc0.18.gf84667d trouble with git commit -p file

2012-10-05 Thread Junio C Hamano
Frans Klaver franskla...@gmail.com writes: On Fri, 05 Oct 2012 16:20:45 +0200, Horst H. von Brand vonbr...@inf.utfsm.cl wrote: What I did: - New file images/coins.asy ~~- 'git add images/coins.asy' - Started adding new stuff to fg.tex - Noticed a old bug in fg.tex, fixed that one - Did

Re: git 1.8.0.rc0.18.gf84667d trouble with git commit -p file

2012-10-05 Thread Jeff King
On Fri, Oct 05, 2012 at 03:29:10PM -0700, Junio C Hamano wrote: Assuming that the last step of what Horst did was git commit -pm, I think Git is wrong in this case. When you tell git commit what to commit, unless you give -i (aka also) option, the command makes a commit to record changes