mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-29 08:08:37 +00:00
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
This commit is contained in:
parent
ed505f893a
commit
280085ef0c
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user