Page MenuHomeFreeBSD

tools/git: ensure git-arc is more platform indepdendent
Needs ReviewPublic

Authored by freebsd_igalic.co on May 5 2023, 9:55 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Feb 24, 2:26 AM
Unknown Object (File)
Jan 9 2024, 8:42 AM
Unknown Object (File)
Dec 20 2023, 7:28 AM
Unknown Object (File)
Dec 10 2023, 8:01 PM
Unknown Object (File)
Oct 10 2023, 5:40 PM
Unknown Object (File)
Oct 9 2023, 3:06 PM
Unknown Object (File)
Oct 9 2023, 3:06 PM
Unknown Object (File)
Oct 1 2023, 9:59 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 51338
Build 48229: arc lint + arc unit

Event Timeline

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

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