From: "Lars Hjemli" <hjemli@gmail.com>
To: "Johannes Schindelin" <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org, "Junio C Hamano" <junkio@cox.net>
Subject: Re: [PATCH] Add git-submodule command
Date: Fri, 25 May 2007 16:16:42 +0200 [thread overview]
Message-ID: <8c5c35580705250716j27695a01kd1db222be6c7eac7@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0705251451530.4648@racer.site>
On 5/25/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> On Fri, 25 May 2007, Lars Hjemli wrote:
> > On 5/25/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> > > On Fri, 25 May 2007, Lars Hjemli wrote:
> > > > + die "Unable to find current revision of submodule '$path'"
> > > > +
> > > > + if test "$subsha1" != "$sha1"
> > > > + then
> > > > + $(cd "$path" && git-fetch && git-checkout -q
> > > "$sha1") ||
> > >
> > > This will make a detached HEAD, right? Do you want that? (I am not
> > > really interested in submodules myself, so I haven't thought about it,
> > > and I haven't followed that monster discussion.)
> >
> > Well, we might want to be smarter about this, but on the other hand: if
> > the user cares, he can always do 'cd $path && git checkout $branch',
> > since 'git submodule -u' will skip submodules with the correct commit
> > checked out.
>
> Fair enough, I guess...
The only alternative I can think of is to check if module.$path.branch
is specified in .gitmodules: if it is, and it's pointing at the wanted
sha1, the right thing would be to checkout that branch. Any other sort
of dwim is bound to get it wrong.
>
> > > I'll let Junio comment on that command line parsing...
> >
> > Heh, I'm a shell illiterate...
>
> ;-)
>
> I guess Junio would like one of his famous
>
> case ,"$init","$update",[...] in
> *1*1) usage
> esac
>
> to prevent running with two actions...
Ahh, that's something I can handle
>
> > > All in all, I like it: it is short, to the point, and it should do the
> > > job (maybe with a few enhancements like "--update" without arguments
> > > means _all_ submodules).
> >
> > Well, it does (or should) update all initialized submodules, but maybe
> > that's not what you meant?
>
> Oops. I meant "init".
Hmm, it does (or should) clone all submodules if you run 'git
submodule --init' (no paths specified). Did it fail for you?
--
larsh
next prev parent reply other threads:[~2007-05-25 14:16 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-25 9:51 [PATCH] Add git-submodule command Lars Hjemli
2007-05-25 10:57 ` Johannes Schindelin
2007-05-25 12:24 ` Johannes Schindelin
2007-05-25 13:46 ` Lars Hjemli
2007-05-25 13:58 ` Johannes Schindelin
2007-05-25 14:16 ` Lars Hjemli [this message]
2007-05-25 14:47 ` Johannes Schindelin
2007-05-25 14:52 ` Lars Hjemli
2007-05-25 18:09 ` Lars Hjemli
2007-05-25 18:41 ` Johannes Schindelin
2007-05-25 19:31 ` Junio C Hamano
2007-05-25 20:29 ` Lars Hjemli
2007-05-25 20:52 ` Junio C Hamano
2007-05-25 22:01 ` Lars Hjemli
2007-05-26 0:17 ` Lars Hjemli
2007-05-26 0:48 ` Johannes Schindelin
2007-05-26 1:23 ` Junio C Hamano
2007-05-26 9:39 ` Lars Hjemli
2007-05-26 10:42 ` Johannes Schindelin
2007-05-26 13:56 ` Lars Hjemli
2007-05-26 14:37 ` Simon Hausmann
2007-05-26 14:48 ` Lars Hjemli
2007-05-25 20:30 ` Johannes Schindelin
2007-05-25 19:57 ` Linus Torvalds
2007-05-25 20:28 ` Johannes Schindelin
2007-05-25 22:33 ` Lars Hjemli
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=8c5c35580705250716j27695a01kd1db222be6c7eac7@mail.gmail.com \
--to=hjemli@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).