Skip to content

Git diffs use pagination inconsistently #1243

Description

@ZimbiX

Affected Version

yay v9.4.6 - libalpm v12.0.1

Issue

When I'm reviewing AUR package changes while running yay, the diffs are paginated inconsistently. If there's a package with a diff longer than the screen height, it'll show only that diff in what seems to be less. When I press Q to continue reviewing, and what remains is a bunch of packages with small diffs, they end up in the scrollback, and I have to scroll back up to see them all, trying to work out where I was up to.

It seems like the current functionality is something akin to sequentially running git diff ... in each package's repo, which has the effect of each one separately being possibly paginated.

I think the desired functionality would be to collect all the diffs, and then paginate that. This could be done by adding the --no-pager flag to the Git command (git --no-pager diff), and piping that into less (but then needing to use the --color Git flag to keep colour enabled, and less -R to interpret ANSI colour safely).

Also, including titles to separate the packages diffs more clearly would be great.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions