Page MenuHomeFreeBSD

tools/git: ensure git-arc is more platform indepdendent
ClosedPublic

Authored by freebsd_igalic.co on May 5 2023, 9:55 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 7, 1:48 PM
Unknown Object (File)
Fri, Oct 25, 12:56 AM
Unknown Object (File)
Sun, Oct 20, 12:28 PM
Unknown Object (File)
Oct 1 2024, 3:59 PM
Unknown Object (File)
Oct 1 2024, 3:59 PM
Unknown Object (File)
Sep 30 2024, 9:48 PM
Unknown Object (File)
Sep 25 2024, 7:25 AM
Unknown Object (File)
Sep 24 2024, 4:56 AM

Details

Summary

Linux systems' tail doesn't have -r.
Instead, we can use git's own --reverse sorting for rev-lists.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.May 5 2023, 1:21 PM
tools/tools/git/git-arc.sh
367

why not

_commits=$(git rev-list --reverse $_commits)

instead?

use git's own --reverse sorting for rev-list

This revision now requires review to proceed.May 5 2023, 4:28 PM

good point.
(mostly because I assumed that the people who wrote this knew git better than I do, and have exhausted its options already)

freebsd_igalic.co retitled this revision from tools/git: ensure git-arc can work on Linux systems to tools/git: ensure git-arc is more platform indepdendent.May 5 2023, 4:31 PM
freebsd_igalic.co edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.May 5 2023, 7:12 PM

It seems that this diff does not apply cleanly on top of main:
Here is why:
patch assumes: _commits=$(git rev-list $_commits | (tail -r 2>/dev/null || tac))
while in reality: _commits=$(git rev-list $_commits | tail -r)

https://reviews.freebsd.org/source/src/browse/main/tools/tools/git/git-arc.sh$343

This revision now requires changes to proceed.May 7 2023, 1:15 AM
This revision was not accepted when it landed; it landed in state Needs Review.Mar 27 2024, 1:58 PM
This revision was automatically updated to reflect the committed changes.