From: Junio C Hamano <gitster@pobox.com>
To: imyousuf@gmail.com
Cc: git@vger.kernel.org, Imran M Yousuf <imyousuf@smartitengineering.com>
Subject: Re: [PATCH v2 3/5] git-submodule.sh: Add Custom argument input support to git submodule recurse subcommand
Date: Mon, 12 May 2008 15:43:34 -0700 [thread overview]
Message-ID: <7v7idzxhwp.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <1209978582-5785-3-git-send-email-imyousuf@gmail.com> (imyousuf@gmail.com's message of "Mon, 5 May 2008 15:09:40 +0600")
imyousuf@gmail.com writes:
> From: Imran M Yousuf <imyousuf@smartitengineering.com>
>
> There is a scenario which has been put forward several times in
> discussion over the recurse subcommand and it is that commands chould have
> different arguments for different modules.
>
> For example, one module could want to checkout 'master', while another might want
> to checkout 'work'. The [-a|--customized-argument] argument provides platform
> just for that. Consider the following command and its followup for further info:
>
> git submodule recurse -a checkout
>
> Submodule b is not initialized and skipped
> git submodule recurse a checkout
> Please provide an argument: master
> Press y to provide another arg...
> git checkout master
> Already on branch "master"
> Submodule d is not initialized and skipped
> git submodule recurse . checkout
> Please provide an argument: master
> Press y to provide another arg...
> git checkout master
> Already on branch "master"
Is it only me who finds this UI (and the one 4/5 further introduces)
somewhat clumsy and extremely ugly?
I am almost tempted to suggest going to the extreme and spawn interactive
shell in each repository directory, like this:
toplevel$ git submodule recurse -a
(info) Submodule b is not initialized and skipped
(info) git submodule recurse 'a'
(info) we now give you a shell in that directory. Do whatever you
(info) like and type cntl-D (or "exit") once you are done.
toplevel/a$ git checkout
toplevel/a$ exit
(info) Submodule d is not initialized and skipped
(info) git submodule recurse '.'
(info) we now give you a shell in that directory. Do whatever you
(info) like and type cntl-D (or "exit") once you are done.
toplevel/.$ git checkout
toplevel/.$ exit
(info) git submodule recurse recursion ended.
toplevel$
so that the users can do whatever they want there.
If we want a useful and flexible "recurse", perhaps the only thing we need
to do is a command that lists a submodule directory path, one path at a
time, in optionally different traversal order and depth cutoff, so that
the user can feed it to xargs and do whatever they want to run in there.
next prev parent reply other threads:[~2008-05-12 22:44 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-05 9:09 [PATCH v2 1/5] git-submodule.sh: Add Long Usage instead of simple usage imyousuf
2008-05-05 9:09 ` [PATCH v2 2/5] git-submodule.sh: Add recurse subcommand with basic options imyousuf
2008-05-05 9:09 ` [PATCH v2 3/5] git-submodule.sh: Add Custom argument input support to git submodule recurse subcommand imyousuf
2008-05-05 9:09 ` [PATCH v2 4/5] git-submodule.sh: Add pre command argument " imyousuf
2008-05-05 9:09 ` [PATCH v2 5/5] Documentation/git-submodule.txt: Add documentation for the " imyousuf
2008-05-12 22:43 ` Junio C Hamano [this message]
2008-05-18 13:27 ` [PATCH v2 3/5] git-submodule.sh: Add Custom argument input support to git submodule " Johan Herland
2008-05-18 13:36 ` Sverre Rabbelier
2008-05-18 15:32 ` Johannes Schindelin
2008-05-18 15:34 ` Sverre Rabbelier
2008-05-19 3:48 ` Imran M Yousuf
2008-05-12 1:20 ` [PATCH v2 2/5] git-submodule.sh: Add recurse subcommand with basic options Junio C Hamano
2008-05-13 6:40 ` Imran M Yousuf
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=7v7idzxhwp.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=imyousuf@gmail.com \
--cc=imyousuf@smartitengineering.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).