git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Ping Yin <pkufranky@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/5] git-submodule: New subcommand 'summary' (1) - code framework
Date: Sat, 12 Jan 2008 00:18:19 -0800	[thread overview]
Message-ID: <7vmyrbv4ms.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <f67f45eeb9648bb7e5adaf53544443b79643914e.1200122041.git.pkufranky@gmail.com> (Ping Yin's message of "Sat, 12 Jan 2008 15:37:11 +0800")

Ping Yin <pkufranky@gmail.com> writes:

> +	# get modified modules which have been checked out (i.e. cared by user)
> +	modules=$(git diff $cache_option --raw $head -- "$@" |
> +		grep '^:160000\|:000000 160000' |
> +		while read mod_src mod_dst sha1_src sha1_dst status name
> +		do

You are listing paths that were already submodule in HEAD, or
newly added submodule.  What about a path that used to be a blob
but is being made into submodule with the next commit (i.e. RHS
is 160000 but LHS is not 000000)?

> +	# TODO: quote module names containing space or tab

Yes, you would need to worry about *un*quoting them.

> +	test -n "$modules" &&
> +	echo "# Submodules modified: "$modules &&
> +	echo "#"
> +	cd "$cwd"

Hmmmmmm.... 

> -case "$add,$init,$update,$status,$cached" in
> -1,,,,)
> +case "$add,$init,$update,$summary,$status,$cached" in
> +1,,,,,)
>  	module_add "$@"
>  	;;

This is simply unsustainable.

Please see the other thread with Imran M Yousuf regarding the
command dispatcher.  I think that should be the first thing to
fix before doing any change.

  parent reply	other threads:[~2008-01-12  8:18 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-12  7:37 [PATCH 0/5] submodule summary support Ping Yin
2008-01-12  7:37 ` [PATCH 1/5] git-submodule: New subcommand 'summary' (1) - code framework Ping Yin
2008-01-12  7:37   ` [PATCH 2/5] git-submodule: New subcommand 'summary' (2) - hard work Ping Yin
2008-01-12  7:37     ` [PATCH 3/5] git-submodule: New subcommand 'summary' (3) - limit summary size Ping Yin
2008-01-12  7:37       ` [PATCH 4/5] git-status: submodule summary support Ping Yin
2008-01-12  7:37         ` [PATCH 5/5] git-status: configurable submodule summary size Ping Yin
2008-01-12  8:36       ` [PATCH 3/5] git-submodule: New subcommand 'summary' (3) - limit " Junio C Hamano
2008-01-12  9:51         ` Ping Yin
2008-01-12 19:17           ` Junio C Hamano
2008-01-13  6:38             ` Ping Yin
2008-01-12  8:32     ` [PATCH 2/5] git-submodule: New subcommand 'summary' (2) - hard work Junio C Hamano
2008-01-12  9:48       ` Ping Yin
2008-01-12 12:24         ` Ping Yin
2008-01-12 19:21           ` Junio C Hamano
2008-01-12 11:12     ` Ping Yin
2008-01-12 19:25       ` Junio C Hamano
2008-01-13  6:28         ` Ping Yin
2008-01-12  8:18   ` Junio C Hamano [this message]
2008-01-12  9:09     ` [PATCH 1/5] git-submodule: New subcommand 'summary' (1) - code framework 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=7vmyrbv4ms.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=pkufranky@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 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).