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:20:11

On Sat, 25 Nov 2006, Linus Torvalds wrote:
On Sun, 26 Nov 2006, Yann Dirson wrote:
quoted
Also, I'd rather expect "git-commit -a" outside of any submodule to
commit everything in the supermodule, triggering submodule commits as an
intermediate step when needed - just like "git-commit -a" does not
require to manually specify subdirectories to inclue in the commit.  I'd
rather expect a special flag to exclude submodules from a commit.
So, how do you do commit messages? It generally doesn't make sense to 
share the same commit message for submodules - the sub-commits generally 
do different things.
The same way you do the first commit message. Ask independantly for each 
commit message in sequence with enough context in the comment section that 
you know what you're talking about.
I'd actually suggest that "git commit -a" with non-clean submodules error 
out for that reason, with something like

	submodule 'src/xyzzy' is not up-to-date, please commit changes to 
	that first.

exactly because you really generally should consider the submodule commits 
to be a separate phase.
I think this is getting close to the classic usability blunder of having 
the program tell you what you should have done instead of what you did, 
and then making you do it yourself, rather than just doing it.

Just have it run "git commit -a" in each dirty submodule recursively as 
part of preparing the index, since that's what the user wants to do 
anyway, and nothing already done would be affected.

"git commit -a -m <message>" should probably fail, of course.

	-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