Re: [PATCH] rev-{list,parse}: allow -n<n> as shorthand for --max-count=<n>

From: Eric Wong <normalperson@yhbt.net>
Date: 2006-01-30 11:25:02
Junio C Hamano <junkio@cox.net> wrote:
> Eric Wong <normalperson@yhbt.net> writes:
> 
> > Both -n<n> and -n <n> are supported.  POSIX versions of head(1) and
> > tail(1) allow their line limits to be parsed this way.  I find
> > --max-count to be a commonly used option, and also similar in spirit to
> > head/tail, so I decided to make life easier on my worn out (and lazy :)
> > fingers with this patch.
> 
> I agree with this in principle.
> 
> > diff --git a/rev-parse.c b/rev-parse.c
> > index 7abad35..3790463 100644
> > --- a/rev-parse.c
> > +++ b/rev-parse.c
> > @@ -21,6 +21,7 @@ static char *def = NULL;
> >  static int show_type = NORMAL;
> >  static int symbolic = 0;
> >  static int output_sq = 0;
> > +static int next_arg_is_rev = 0;
> 
> Do you need this here, or can it be made auto in main()?

Oops, I had changes in is_rev_argument() that I eventually
moved entirely to main().  Cleaned up patch on the way.

-- 
Eric Wong
-
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 Mon Jan 30 11:25:47 2006

This archive was generated by hypermail 2.1.8 : 2006-01-30 11:25:56 EST