From: Roman Shaposhnik <rvs@sun.com>
To: Avery Pennarun <apenwarr@gmail.com>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Tim Harper <timcharper@gmail.com>,
git@vger.kernel.org
Subject: Re: Making submodules easier to work with (auto-update on checkout or merge, stash & restore submodules)
Date: Wed, 30 Apr 2008 12:55:45 -0700 [thread overview]
Message-ID: <1209585345.25663.797.camel@work.sfbay.sun.com> (raw)
In-Reply-To: <32541b130804300947s6083156etc6514cc13c24af13@mail.gmail.com>
On Wed, 2008-04-30 at 12:47 -0400, Avery Pennarun wrote:
> On 4/30/08, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> That said, it makes submodule folders act completely inconsistently
> with normal folders, which is highly undesirable. The current
> behaviour strongly encourages me to avoid submodules when I would
> otherwise like to use them, just to keep the rest of my team members
> (who are not git experts) from going insane.
Well said. I find myself in exactly the same situation wrt. submodules.
To give an analogy imagine that everytime you had a mount-point in
your path you'd have to do something special in order to cross it.
IOW, open("/tmp/foo/bar/baz.c") would just work, where
open("/mnt/point1/foo.c") would require you to first cross /mnt/point1
somehow. Currently submodules feel very much like the second case
to me. Now, I've shut up for the time being on that other thread,
since I'd like to come up with a clearly defined workflow first.
But for the record: the way submodules are implemented right now
in a porcelain make them pretty much an impossible sell to those
in my org who don't want to know much about SCMs.
> > But once you did "submodule init", you will never need to run it again,
> > since it edits your .git/config, which does not change when switching
> > branches.
>
> Not true. If ".gitmodules" is different between branches, then
> .git/config will have the wrong information. I think this was the
> reason for the "read .gitmodules directly and don't worry about
> .git/config" discussion/patches earlier.
Exactly!
> > And as for "submodule update", I like the fact that the submodule is not
> > updated automatically. For example, when I actively develop a submodule,
> > but have to rebase the superproject, I would _hate_ it if the submodule
> > wass updated.
>
> Why? Every other folder in your entire project gets updated when you
> "git checkout". Why are submodules different? I can personally vouch
> that this is confusing for almost everyone I've seen who tried it.
+1 ;-)
> > > PITFALLS:
> > > pitfall)
> > > If you commit a change on a submodule that's not on a branch, auto-updating
> > > submodules will make it difficult to revive that change.
> > >
> > > workaround)
> > > Don't allow the user to commit unless they are on a branch.
> > >
> > > ... couldn't think of anymore. Anyone?
>
> We had some discussion on the list earlier about having submodule
> checkouts automatically acquire a branch name, so that commits don't
> get lost as easily. I was going to think about this more and
> eventually submit a patch, but I haven't gotten to it yet. Anyway,
> the idea is that you have a branch by default, so that you don't end
> up in the useless situation of not being on a branch, which encourages
> checking in without being on a branch, in the first place.
Can you give a gmane pointer to that thread?
Thanks,
Roman.
next prev parent reply other threads:[~2008-04-30 19:52 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-30 4:08 Making submodules easier to work with (auto-update on checkout or merge, stash & restore submodules) Tim Harper
2008-04-30 4:47 ` Tim Harper
2008-04-30 6:14 ` Andreas Ericsson
2008-04-30 10:31 ` Johannes Schindelin
2008-04-30 16:47 ` Avery Pennarun
2008-04-30 17:21 ` Ping Yin
2008-04-30 19:55 ` Roman Shaposhnik [this message]
2008-04-30 20:26 ` Avery Pennarun
2008-04-30 20:19 ` Tim Harper
2008-04-30 20:31 ` Avery Pennarun
2008-04-30 21:37 ` Tim Harper
2008-04-30 21:48 ` Avery Pennarun
2008-04-30 22:23 ` Roman Shaposhnik
2008-04-30 22:28 ` Avery Pennarun
2008-05-01 18:38 ` Making submodules easier to work with Finn Arne Gangstad
2008-05-01 19:55 ` Avery Pennarun
2008-05-06 23:47 ` Roman Shaposhnik
2008-05-07 16:14 ` Avery Pennarun
2008-05-08 1:13 ` Ping Yin
2008-05-01 23:29 ` Steven Grimm
2008-05-06 23:17 ` Roman Shaposhnik
2008-05-01 4:56 ` Making submodules easier to work with (auto-update on checkout or merge, stash & restore submodules) Ping Yin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1209585345.25663.797.camel@work.sfbay.sun.com \
--to=rvs@sun.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=apenwarr@gmail.com \
--cc=git@vger.kernel.org \
--cc=timcharper@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.