git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <junkio@cox.net>
Date
Aug 9, 2005, 17:00 UTC
Message-ID
<7vd5onvydk.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.63.0508091618320.7995@wgmdd8.biozentrum.uni-wuerzburg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 5 quoted lines
>> 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 ;-).

Previous: Johannes SchindelinNext: Junio C Hamano
Message 9 of 12 in “Making CFLAGS compilant with GNU Coding Standards”
  1. Making CFLAGS compilant with GNU Coding StandardsPavel Roskin, Aug 6, 2005
  2. Junio C HamanoAug 8, 2005
  3. Ryan AndersonAug 8, 2005
  4. Johannes SchindelinAug 8, 2005
  5. Junio C HamanoAug 9, 2005
  6. Sanity check of git-commit patch, was Re: [PATCH] Making CFLAGS compilant with GNU Coding StandardsJohannes Schindelin, Aug 9, 2005
  7. Junio C HamanoAug 9, 2005
  8. Johannes SchindelinAug 9, 2005
  9. Junio C HamanoAug 9, 2005
  10. Junio C HamanoAug 10, 2005
  11. Junio C HamanoAug 9, 2005
  12. Pavel RoskinAug 11, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.