From: Daniel Barkalow Date: Tue, 28 Nov 2006 18:37:54 GMT Subject: Re: [RFC] Submodules in GIT Message-ID: In-Reply-To: <20061128180817.GA12463MdfPADPa@greensroom.kotnet.org> On Tue, 28 Nov 2006, Sven Verdoolaege wrote: > On Tue, Nov 28, 2006 at 12:28:47PM -0500, Daniel Barkalow wrote: > > It would be wrong to do "commit -a" in submodules if the supermodule > > weren't being committed with -a, of course. > > What if you say "git commit submodule" ? Obviously no -a, as I said. > If you agree with the above, then why should "git commit -a" > do any different from "git commit submodule" if submodule was > the only thing that got changed ? If submodule was the only thing that got changed, it's not dirty; if it were dirty, some of its contents would also have gotten changed. Surely: "git commit submodule/foo bar" should do "git commit foo" in submodule, and then commit the supermodule with the new commit for the submodule and the change to bar. And so "submodule/foo" is something you could commit changes to, so it should get picked up by -a. Of course, if submodule *is* the *only* thing that changed (e.g., you did a fast-forward merge in it, or you've previously committed it completely), there won't be a "commit -a" in it, because that would just generate a gratuitous commit. -Daniel