git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Ping Yin" <pkufranky@gmail.com>
To: "Junio C Hamano" <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH/RFC v2] git-submodule: multi-level module definition
Date: Thu, 6 Mar 2008 13:48:06 +0800	[thread overview]
Message-ID: <46dff0320803052148wd4fe5e3hfde72b4362b0cc8b@mail.gmail.com> (raw)
In-Reply-To: <7vejaoldgu.fsf@gitster.siamese.dyndns.org>

On Thu, Mar 6, 2008 at 11:48 AM, Junio C Hamano <gitster@pobox.com> wrote:
> "Ping Yin" <pkufranky@gmail.com> writes:
>
>

>  I think we are saying the same thing, and I do not understand why you
>  sound so upset about my comments.  I never said it is bad to copy the
>  "hints" supplied by .gitmodules verbatim to $GIT_DIR/config.
>
>  See how the current cmd_init() uses the information in .gitmodules.  It
>  could later become interactive to allow users to override what's in there,
>  but by default it simply uses the information from .gitmodules verbatim.
>
>  However, a short-hand to name groups of submodules is not just about
>  naming one thing with one name, but has user convenience aspect too.
>  There should be per-user customizability built into the design.  You could
>  probably fix this by making the code first consult $GIT_DIR/config and
>  then fall back on in-tree .gitmodules file.

We agree on this point and 'fall back' is what i will try to do. Our
difference is the
 way to implement it. Since finally we can fall back to .gitmodules
when information
 is not found in .git/config, why always use 'git init' at the first.

'git init' should be useful when a user has many special requirements which can
help the user copy info from .gitmodules to .git/config and then edit
.git/config.
But in many cases (at least in my company), users may not have special
requirements,
so he needn't use 'git init'.

So now 'git init' is not the first class citizen, it's just a util to
help users when they need it.

And there may be inconsistence between .git/config and .gitmodules
when always using 'git init'
at first. If .gitmodules has changed in the upstream, what should user
do? run 'git init' again? That's
not so easy.  Since .git/config has a whole copy of .gitmodules, the
user has no easy way to know
which entries he has changed which shouldn't follow the upstream changes.

>
>  By the way, in your patch, I notice that quoting of $name is often very
>  loosely done.  I do not think we have officially defined what the allowed
>  repertoire of module name characters are, but we probably should declare
>  the rules and make sure the code actively enforces it to prevent future
>  grief.  I'd say the same restriction as we have for refnames, except
>  that we do not allow slashes either, is good enough?
>
I think it's enough.

In this bash script, there are many places which don't/can't handle
names containing whitespace
well. So the decaring a naming rule for the modue name sounds good.



-- 
Ping Yin

  reply	other threads:[~2008-03-06  5:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-04 16:04 [PATCH/RFC v2] git-submodule: multi-level module definition Ping Yin
2008-03-04 16:12 ` Johannes Schindelin
2008-03-05  2:13   ` Ping Yin
     [not found] ` <7bfdc29a0803041917j16112e80uc0b21707bdfd3fe@mail.gmail.com>
     [not found]   ` <46dff0320803042315t2d89eb6fl325b4b2ef8ddbc44@mail.gmail.com>
2008-03-05  7:16     ` Ping Yin
2008-03-05  7:40       ` Imran M Yousuf
2008-03-05  7:53         ` Ping Yin
2008-03-05  8:03           ` Imran M Yousuf
2008-03-05 23:18 ` Junio C Hamano
2008-03-06  1:54   ` Ping Yin
2008-03-06  2:16     ` Imran M Yousuf
2008-03-06  2:32     ` Johannes Schindelin
2008-03-06  5:18       ` Ping Yin
2008-03-06  3:48     ` Junio C Hamano
2008-03-06  5:48       ` Ping Yin [this message]
2008-03-07  1:43         ` 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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46dff0320803052148wd4fe5e3hfde72b4362b0cc8b@mail.gmail.com \
    --to=pkufranky@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).