Re: --max-count useless with git-rev-list's --reverse

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

 



On Mon, Mar 7, 2011 at 11:17, Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> wrote:
> From the manpage:
>
>   --reverse
>       Output the commits in reverse order. Cannot be combined with
> --walk-reflogs.
>
> Shouldn't --reverse be applied *before* --max-count?

No. Its applied after, otherwise things like "git log -n 5 --reverse"
wouldn't let me review the last 5 commits in chronological order. It
also would take a long time to find the first 5 commits in a project
the size of linux-2.6. Most users don't care about the first 5 commits
of a project, but they do care about the most recent X commits that
may have occurred.

So yes, sometimes the reverse doesn't occur where you want it, but its
so rare to want the first X commits of a project's history that its
just accepted. In theory we could add a
--reverse-from-beginning-of-time flag to do what you want, but I don't
think anyone has cared enough to implement this. Most users who want
the beginning of time are OK with something like `git show $(git
rev-list --all | tail -1)`.

-- 
Shawn.
--
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]