Re: [PATCH] Lose perl dependency. (fwd)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Johannes Schindelin <Johannes.Schindelin@xxxxxx> writes:

> P.S.: Perhaps you should just stop worrying and learn to love --reverse 
> ;-)

Another thing to think about is how --reverse should interact
with --max-count and --skip (and perhaps --max-age but I am not
sure about that one).

I think there are two very valid ways.  You determine what you
would spit out as if there is no --reverse, and then reverse the
result, or you do not limit with them to get everthing, reverse
the result and do the counting limit on that reversed list.

The former is probably more efficient (I do not think you would
need to artificially make it limited like your patch does if you
go this route), while the latter may or may not be more useful
for what the end users would want to do.

For example, "git log -4" would show the topmost four commits.
If you do the former, "git log --reverse -4" would give you the
same four but in the chronological order (we usually show in the
reverse order and --reverse would make it the forward order ;-),
and you do not need to do the limiting for this.  You need to
capture them and reverse them yourself anyway, so not having to
limit may not be a big deal, though.

If you do the latter, you would be able to get the first four
commits in the chronological order.  I do not think that is
usually of much practical value (although people new to git
always seem to ask "how do I get to the root commit" at least
once), but there may be some valid uses for that kind of
behaviour.

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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]