[RFC] git-fsck-cache argument processing

From: Sean <seanlkml@sympatico.ca>
Date: 2005-05-21 13:38:52
Here is a first crack at using argp as suggested by Jeff Garzik to
implement argument processing as requested by Junio and Linus.  Each of
the long arguments have been given a single character equivalent as well.

This patch only converts fsck-cache to use argp in case anyone has
objections to the basic format or style.  The patch includes a version
number inside of fsck-cache.c; this should really be in a separate include
file so you can run any command with --version and get the same answer.

With this change you have:

$ git-fsck-cache -?
Usage: git-fsck-cache [OPTION...] [HEAD-SHA1...]
git-fsck-cache - repository consistency check

 -c, --cache            Mark all objects referenced by cache as reachable
 -d, --delta-depth      Show the maximum length of delta chains
 -r, --root             Show root objects, ie. those without parents
 -t, --tags             Show revision tags
 -u, --unreachable      Show missing objects or deltas
 -?, --help             Give this help list
     --usage            Give a short usage message
 -V, --version          Print program version

And the following should work as expected:

$ git-fsck-cache -crudt


fsck-cache.c |   64
+++++++++++++++++++++++++++++++++++------------------------
1 files changed, 39 insertions(+), 25 deletions(-)

Sean



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

Received on Sat May 21 13:39:41 2005

This archive was generated by hypermail 2.1.8 : 2005-05-21 13:39:41 EST