On Saturday 04 February 2006 22:24, Junio C Hamano wrote: > Junio C Hamano <junkio@cox.net> writes: > > An example of such semantic change would be: if I am in > > subdirecotry foo/, commit changes to files in that subdirectory > > and subdirectory alone. But that is actively _encouraging_ > > partial commits (commits that records a state that never existed > > in your working tree as a whole) so I personally am not so > > enthused to buy such a _feature_. > > Before people start complaining about it, I take this part > back. "git commit -a" inside a subdirectory "foo" is not much > different from "git commit foo/a foo/b foo/c" from the toplevel > directory to explicitly say "Don't worry about what I told the > index so far; I want to check in changes only to these paths", > and making a partial commit out of the current HEAD and the > specified working tree files using a temporary index (while > updating the main index at the same time), so I am inclined to > say we should support it that way, since during the previous > discussion we have pretty much settled how we would want "git > commit paths..." and "git commit --include paths..." commands to > behave. And I did describe a use case this morning in another thread for this very thing. For convenience I repeat it here [Incidentally there is a use case that doesn't seem to have been discussed in this thread which I use cg-commit all the time for and will now have to see if there is a use index file equivalence for. That is, I am developing a web application and in the running version the database framework (iBatis) is using Tomcats connection pooling. In order to run my JUnit test harness, I don't have tomcat, so I need to define a different version of iBatis configuration file to used its own database connection. So I have created a test branch and edited the configuration file in that branch, and I update both code and tests in a edit/compile/fix and text loop until I have written or changed both code and tests. I then do a cg-commit which lists the files I have changed. I ONLY commit those in the test harness - by deleting the others from cogito's list of files to commit - and then repeat the commit commiting the rest]. I then switch back to my master branch and cherry pick commit that is the code changes - not the text harness] In this case the tests, and the code that it was testing were in different subdirectories, so the ability to go into one directory and commit all in that directory, followed by the ability to go into the other and do the same would be extremely useful. -- Alan Chandler http://www.chandlerfamily.org.uk Open Source. It's the difference between trust and antitrust. - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.htmlReceived on Sun Feb 05 10:00:04 2006
This archive was generated by hypermail 2.1.8 : 2006-02-05 10:00:14 EST