Re: [PATCH] git-rev-list --help anywhere
- From
- linux@horizon.com <linux@horizon.com>
- Date
- Feb 19, 2006, 11:26 UTC
- Message-ID
- <20060219112627.18989.qmail@science.horizon.com>
>+ for (i = 1 ; i < argc; i++) >+ if ( !strcmp(argv[i], "--help") ) >+ usage(rev_list_usage);
You might want to try something more like:
+ for (i = 1 ; i < argc; i++) { + if ( !strcmp(argv[i], "--help") ) + usage(rev_list_usage); + if ( !strcmp(argv[i], "--") ) + break; + }
So that you don't break in the perverse but legal case of having a file named "--help".