Seeking an effective way to page git log output when --all option is used #3969
Unanswered
axosoft-ramint
asked this question in
Q&A
Replies: 1 comment 3 replies
-
That is not a workaround, but according to the implementation it does the exact thing that one would want for paging: it uses the very same traversal mechanism as the rest of the |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When using
git log
with-n
to limit the number of results, I can page the results by using the id/SHA of the last commit in the list to get more, i.e.:However, this logic seems to fall apart when using the
--all
option withgit log
, as it seems to bring in everything.One workaround is to use
-skip
for paging, but it's a bit risky for my implementation (filtering out stash commits, for example, may affect the count).Another workaround I've considered is to use commit date for paging i.e.
--until/--before
with the unix timestamp of the last commit date from the previous list, but I can see an edge case where if enough commits have the same timestamp (for example, a massive rebase), the paging would either not move forward or would skip commits in the next set that match the date timestamp, depending on how it's implemented.Is there a more effective/elegant way of achieving paging
git log
output (possibly using a commit id) when using--all
and limiting the number of results with-n
?Beta Was this translation helpful? Give feedback.
All reactions