Re: Sanity check of git-commit patch, was Re: [PATCH] Making CFLAGS compilant with GNU Coding Standards

2005-08-10 Thread Johannes Schindelin
Hi,

On Tue, 9 Aug 2005, Horst von Brand wrote:

> Isn't it easier to just use getopt(1)?

Only if GNU getopt is available. On Mac OS X, only the BSD version is 
installed by default, which does not handle long options at all.

> Please stop! I'm dizzy already!

:-)

Ciao,
Dscho

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Sanity check of git-commit patch, was Re: [PATCH] Making CFLAGS compilant with GNU Coding Standards

2005-08-10 Thread Horst von Brand
Junio C Hamano <[EMAIL PROTECTED]> wrote:
> Johannes Schindelin <[EMAIL PROTECTED]> writes:
> 
> >> True.  My bad old habit.
> >
> > An elegant method to do that:
> >
> > case --some-long-option in "$1"*) ..; esac
> 
> You are almost correct, but you need to realize that I generate
> that long "case -s|--s|--so|--som|..." chain using a script that
> takes all potential option names as its arguments, and makes
> case arms that contain only unambiguous ones, so that I can
> handle --some-long-option and --some-other-long-option sensibly.

My head spins

Isn't it easier to just use getopt(1)?

> Also you forgot to grok --some-option-with-args=* in your
> version ;-).

Please stop! I'm dizzy already!
-- 
Dr. Horst H. von Brand   User #22616 counter.li.org
Departamento de Informatica Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria  +56 32 654239
Casilla 110-V, Valparaiso, ChileFax:  +56 32 797513
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Sanity check of git-commit patch, was Re: [PATCH] Making CFLAGS compilant with GNU Coding Standards

2005-08-09 Thread Junio C Hamano
Junio C Hamano <[EMAIL PROTECTED]> writes:

>> - Multiple -m options was actually a feature of my version of the patch.
>
> Ah, OK.

I said "OK" and thought about it again.  While thinking about
what is the right inter-message-piece separator for multiple -m
parameters (you use "\n"), I got a headache.  I decided to keep
what is already there after all ;-).

I'll push things out tonight and expect to tag things tomorrow
late afternoon to declare 0.99.4

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Sanity check of git-commit patch, was Re: [PATCH] Making CFLAGS compilant with GNU Coding Standards

2005-08-09 Thread Junio C Hamano
Johannes Schindelin <[EMAIL PROTECTED]> writes:

>> True.  My bad old habit.
>
> An elegant method to do that:
>
> case --some-long-option in "$1"*) ..; esac

You are almost correct, but you need to realize that I generate
that long "case -s|--s|--so|--som|..." chain using a script that
takes all potential option names as its arguments, and makes
case arms that contain only unambiguous ones, so that I can
handle --some-long-option and --some-other-long-option sensibly.

Also you forgot to grok --some-option-with-args=* in your
version ;-).

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Sanity check of git-commit patch, was Re: [PATCH] Making CFLAGS compilant with GNU Coding Standards

2005-08-09 Thread Johannes Schindelin
Hi,

On Tue, 9 Aug 2005, Junio C Hamano wrote:

> Johannes Schindelin <[EMAIL PROTECTED]> writes:
> 
> > - I don't like the GNU way to abbreviate long options too much...
> 
> True.  My bad old habit.

An elegant method to do that:

case --some-long-option in "$1"*) ..; esac

Ciao,
Dscho

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Sanity check of git-commit patch, was Re: [PATCH] Making CFLAGS compilant with GNU Coding Standards

2005-08-09 Thread Junio C Hamano
Johannes Schindelin <[EMAIL PROTECTED]> writes:

> I just checked. Three nitpicks:
>
> - I don't like the GNU way to abbreviate long options too much...

True.  My bad old habit.

> - Multiple -m options was actually a feature of my version of the patch.

Ah, OK.

> - The "case .. in x) .. ;; esac;" construct is sometimes more confusing 
>   than a simple "if", or even a "[ .. = x ] && ..".

Yes sometimes.

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Sanity check of git-commit patch, was Re: [PATCH] Making CFLAGS compilant with GNU Coding Standards

2005-08-09 Thread Johannes Schindelin
Hi,

On Mon, 8 Aug 2005, Junio C Hamano wrote:

> Johannes, could you sanity check the commit change I have in the
> proposed updates branch when things percolate through kernel.org
> mirror network?  I ended up pushing it out before I found you
> already did a patch.

I just checked. Three nitpicks:

- I don't like the GNU way to abbreviate long options too much. Either you 
  know exactly what you're doing, and you use the short form, or you want 
  to make sure that you have spelt it correctly. Besides, it makes the 
  code less readable and more prone to errors.

- Multiple -m options was actually a feature of my version of the patch.

- The "case .. in x) .. ;; esac;" construct is sometimes more confusing 
  than a simple "if", or even a "[ .. = x ] && ..".

As I said, just nitpicks. I didn't test, though. I'll do that when the 
commit is in the master branch :-) Maybe I'll even write my first git test 
case, who knows?

Ciao,
Dscho

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html