On Sun, Apr 07, 2013 at 11:37:02PM +0530, Ramkumar Ramachandra wrote:
> John Keeping wrote:
> > On Sun, Apr 07, 2013 at 10:52:50PM +0530, Ramkumar Ramachandra wrote:
> >> Sure, I'll write it out for you from an end-user perspective:
> > To play Devil's Advocate for a bit...
> >> 0. Great UI/UX. No more cd-to-toplevel, and a beautiful set of native
> >> commands that are consistent with the overall design of git-core.
> >> Which means: clone (to put something in an unstaged place), add (to
> >> stage), and commit (to commit the change). There's now exactly one
> >> place in your worktree (which is represented as one file in git; think
> >> of it a sort of symlink) to look in for all the information. git
> >> cat-link <link> to figure out its parameters, git edit-link to edit
> >> its parameters: no more "find the matching pwd in .gitmodules in
> >> toplevel". To remove a submodule, just git rm. And git mv works!
> > Presumably now without .git/config support, so I can't override the
> > checked-in settings without my own custom branch. Even carrying a dirty
> > working tree seems problematic here since a checked-out link object is a
> > directory, which can't have information like the remote URL in it.
> Sure you can have a dirty worktree. It's just like .gitmodules:
> there's zero difference but for the fact that .gitmodules is
> accessible directly via your filesystem, while links are not.
I can't see how this gets me a dirty working tree. Since the link needs
to be stored somewhere, I assume it's in the index; so I can have staged
changes, but not unstaged changes.
> >> 1. True floating submodules. You can have a submodule checked out at
> >> `master` or `v3.1`: no more detached HEADs in submodules unless you
> >> want fixed submodules. No additional cruft required to do the
> >> floating: the information is native, in a link object.
> > Can't I do that now with "submodule.<name>.branch" and "git submodule
> > update --remote --rebase" and friends?
> Yes, but that is not true floating: you shouldn't have to be sorry and
> rebase. In new-style submodules, they're first class citizens (ie.
> true): you can just replace the SHA-1 with a ref in the link.
But what happens if I make any changes on top? With --rebase and
--merge I can specify exactly what I want to happen (and obviously if I
don't have any changes then whichever I choose simply sets my branch to
the upstream ref).
> >> 2. Initializing a nested submodule without having to initialize the
> >> outer one: no more repo XML nonsense. And it's composable: you don't
> >> need to put the information about all submodules in one central place.
> > How does this interact when there is the following structure:
> > super
> > `-- sub
> > `-- subsub (specified by sub)
> > and subsub is specified as a submodule in *both* super and sub but with
> > different settings. Do I get different behaviour depending on $PWD?
> This is a very fringe case that I haven't thought about. I don't know
> how it will behave: I haven't built it yet (and don't have the entire
> implementation in my head yet).
> >> 3. Ability to have very many large submodule repositories without the
> >> performance hit. It makes sense to block stat() from going through
> >> when you have floating submodules. This means that many levels of
> >> nesting are very easily possible.
> > Can't I already control this to some degree? Certainly the following
> > commands take different amounts of time to run:
> > git status
> > git -c status.submodulesummary=true status
> You can't control the most fundamental thing, stat(): this is the
> primary killer of performance on a large worktree. There is currently
> no way to block stat(): new-style submodules offers a way to configure
> which submodules to block the stat() on.
So it would be something like per-submodule --untracked-files and
--ignore-submodules settings? I can see that being useful.
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html