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)
Sun, May 5, 3:24 AM
Unknown Object (File)
Wed, May 1, 2:23 PM
Unknown Object (File)
Tue, Apr 30, 12:59 AM
Unknown Object (File)
Sun, Apr 28, 12:37 PM
Unknown Object (File)
Sat, Apr 27, 3:01 AM
Unknown Object (File)
Fri, Apr 26, 7:26 PM
Unknown Object (File)
Wed, Apr 24, 10:46 AM
Unknown Object (File)
Wed, Apr 24, 9:35 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.