git: 280085ef0c9d - main - tools/git: ensure git-arc is more platform indepdendent
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 27 Mar 2024 13:58:08 UTC
The branch main has been updated by jhibbits:
URL: https://cgit.FreeBSD.org/src/commit/?id=280085ef0c9d754711d68ac74ccd98b58f54c716
commit 280085ef0c9d754711d68ac74ccd98b58f54c716
Author: Mina Galić <freebsd@igalic.co>
AuthorDate: 2024-03-27 13:53:39 +0000
Commit: Justin Hibbits <jhibbits@FreeBSD.org>
CommitDate: 2024-03-27 13:57:01 +0000
tools/git: ensure git-arc is more platform indepdendent
Summary:
Linux systems' tail doesn't have `-r`.
Instead, we can use git's own `--reverse` sorting for `rev-list`s.
Reviewed by: markj, imp, jhibbits
Differential Revision: https://reviews.freebsd.org/D39975
---
tools/tools/git/git-arc.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/tools/git/git-arc.sh b/tools/tools/git/git-arc.sh
index c74577e2d5d7..1c828f3194af 100644
--- a/tools/tools/git/git-arc.sh
+++ b/tools/tools/git/git-arc.sh
@@ -364,7 +364,7 @@ build_commit_list()
_commits=$(git rev-parse "${chash}")
if ! git cat-file -e "${chash}"'^{commit}' >/dev/null 2>&1; then
# shellcheck disable=SC2086
- _commits=$(git rev-list $_commits | tail -r)
+ _commits=$(git rev-list --reverse $_commits)
fi
[ -n "$_commits" ] || err "invalid commit ID ${chash}"
commits="$commits $_commits"