On Thu, Nov 29, 2012 at 08:11:20PM -0500, Phil Hord wrote: > On Thu, Nov 29, 2012 at 2:13 PM, W. Trevor King wrote: > > On Thu, Nov 29, 2012 at 01:29:12PM -0500, Phil Hord wrote: > >> For that reason, I don't like the --pull switch since it implies a > >> fetch, but I will not always want to do a fetch. > > > > $ git submodule update --remote --no-fetch > > > > will not fetch the submodule remotes. > > This seems precisely backwards to me. Why not use > > $ git submodule update --remote --fetch > > to do your "default" behavior instead? I suppose I am arguing > against the tide of the dominant workflow, but the fetch-by-default > idea needlessly conflates two primitive operations: "float" and > "fetch". Because --no-fetch is the existing option, and if it ain't broke… ;). > >> I don't know which remote I should be tracking, though. I suppose > >> it is 'origin' for now, but maybe it is just whatever > >> $superproject's HEAD's remote-tracking branch indicates. > > > > With the --remote series, I always use "origin" because that's what > > `submodule add` should be setting up. If people want to change that > > up by hand, we may need a submodule..remote configuration > > option. > > I've always felt that the "origin" defaults are broken and are simply > being ignored because most users do not trip over them. But ISTR that > submodule commands use the remote indicated by the superproject's > current remote-tracking configuration, with a fallback to 'origin' if > there is none. Sort of a "best effort" algorithm, I think. Am I > remembering that wrong? The current code uses a bare "git-fetch". I'm not sure what that defaults to if you're on a detached head. If it bothers you, I'm fine adding the submodule..remote option in v6. > >> I am not sure I want the gitlinks in superproject to update automatically > >> in the index, but I definitely do not want to automatically create a commit > >> for them. > > > > Commits are dissabled by default (see my recent --commit RFC for how > > they would be enabled). > > > >> But I really don't want to figure out how to handle submodule > >> collisions during a merge (or rebase!) of my superproject with changes that > >> someone else auto-committed in his local $superproject as he and I > >> arbitrarily floated up the upstream independently. There is nothing but > >> loathing down that path. > > > > This is true. I'm not sure how gitlink collisions are currently > > handled… > > They've always been trouble for me. But it may be that I am ignorant. I haven't dealt with any gitlink merges, but I think that supporting easy gitlink merges is orthogonal to this --remote option. For simple cases like "autocommitted submodule floats", one of the conflicting gitlinks will be an ancestor of the other, so it should be easy to automate that merge. Cheers, Trevor -- This email may be signed or encrypted with GnuPG (http://www.gnupg.org). For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy