Thread (192 messages) flat view 192 messages, 22 authors, 2016-08-11

Re: [RFC] Submodules in GIT

From: Daniel Barkalow <hidden>
Date: 2016-08-11 19:32:50

On Tue, 28 Nov 2006, Sven Verdoolaege wrote:
On Tue, Nov 28, 2006 at 12:28:47PM -0500, Daniel Barkalow wrote:
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help