git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Pierre Habouzit <madcoder@debian.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	gitster@pobox.com, git@vger.kernel.org
Subject: Re: Bring parse_options to the shell
Date: Fri, 2 Nov 2007 18:21:17 +0000 (GMT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0711021818480.4362@racer.site> (raw)
In-Reply-To: <20071102160925.GC27505@artemis.corp>

Hi,

On Fri, 2 Nov 2007, Pierre Habouzit wrote:

> On Fri, Nov 02, 2007 at 03:51:13PM +0000, Linus Torvalds wrote:
> 
> > That command [rev-parse] was written exactly to parse a command line. 
> > This is really cheesy, and doesn't really work right (it splits up 
> > numbers too), but you get the idea..
> 
>   I get the idea, though parse-options is not incremental at all, this 
> could probably be done, but would complicate the API (we would need to 
> allocate a state object e.g.). And parseoptions checks that options 
> getting an argument have one, checks that options exists and so on. It 
> looks like to me that it's not easy to plumb into rev-parse without 
> being a brand new independant mode.
> 
>   We can do that, if we don't want yet-another-git-builtin/command, but 
> in the spirit it'll remain a brand new "thing".
> 
>   Though I'd be glad to hear about what others think about it.

Yeah, rev-parse's only purpose in life is to help scripts.  (Even if it is 
used sometimes -- even by myself -- to turn symbolic names into SHA-1s.)

IMHO it makes tons of sense to put the functionality into that command, 
even if it is not incremental.

Ciao,
Dscho

  reply	other threads:[~2007-11-02 18:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-02 15:09 Bring parse_options to the shell Pierre Habouzit
2007-11-02 15:09 ` [PATCH] Add git-parseopt(1) to bring parse-options to shell scripts Pierre Habouzit
2007-11-02 15:09   ` [PATCH] Update git-sh-setup(1) to allow transparent use of git-parseopt(1) Pierre Habouzit
2007-11-02 15:09     ` [PATCH] Migrate git-clean.sh to use git-parseoptions(1) Pierre Habouzit
2007-11-02 15:58       ` [PATCH] Migrate git-clone to use git-parseopt(1) Pierre Habouzit
2007-11-02 15:14 ` Bring parse_options to the shell Pierre Habouzit
2007-11-02 15:51   ` Linus Torvalds
2007-11-02 16:09     ` Pierre Habouzit
2007-11-02 18:21       ` Johannes Schindelin [this message]
2007-11-02 18:48         ` Pierre Habouzit

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=Pine.LNX.4.64.0711021818480.4362@racer.site \
    --to=johannes.schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=madcoder@debian.org \
    --cc=torvalds@linux-foundation.org \
    /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).