From: "Govind Salinas" <govind@sophiasuchtig.com>
To: "Git Mailing List" <git@vger.kernel.org>
Subject: Problem with --skip and --max-count
Date: Fri, 22 Aug 2008 10:06:46 -0500 [thread overview]
Message-ID: <5d46db230808220806j21a81864he77a3b05e298ce2b@mail.gmail.com> (raw)
Hey Folks,
I have been working on my porcelain, trying to get it semi-polished and
I noticed that the behavior of --skip and --max-count is not what I expected
in several cases.
For simple output, it works as I think it should, but whenever you are doing
some kind of filtering or non-standard commit limiting, such as passing
--follow, it does not print out the first X results. Similarly --skipping the
number of items that you got back does not put get you to where you left
off.
Basically, I am trying to use --skip and --max-count to do paging, but
when I add filters, it doesn't work very well. For example...
$ git log --pretty=oneline --follow -- pyrite/git/repository.py | wc -l
103
$ git log --pretty=oneline --follow -20 -- pyrite/git/repository.py | wc -l
2
$ git log --pretty=oneline --follow -20 --skip=20 --
pyrite/git/repository.py | wc -l
2
So where I am trying to page by 20, I am only getting a random number of
commits depending on how many fit the criteria in the window. I understand
this is probably by design, but it is not optimal to work with. I had to
manually do the skipping and limiting, which would probably have been
more efficient if it had been done by git. Would it be possible to get
git to limit and skip based on the number of results it had returned rather
than the number of result it had processed? Even new cmd line args
would work.
I am using 1.6.0 BTW.
Thanks,
Govind
reply other threads:[~2008-08-22 15:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5d46db230808220806j21a81864he77a3b05e298ce2b@mail.gmail.com \
--to=govind@sophiasuchtig.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).