On 19/06/2026 05:23, Collin Funk wrote:
Sam James <[email protected]> writes:
I was going to make a comment on a recent commit
(bd649cca23f30646a3856b47cd1c7afd1aeb6db3) but found there was no mail
on the coreutils ML for me to reply to.
I've just sent this email to the list for discussion.
Note the diff does have the github PR discussion link
in the commit message, if you wanted to comment there.
Pádraig, WDYT about perhaps git-send-email'ing patches merged from
GitHub? I don't want to put work onto you though and I'm only an
occasional writer on the coreutils ML, so I already feel a little bad
asking.
It sounds like a good idea to me. I kind-of review the GitHub PRs as
well, though not as much as Pádraig, but still prefer email.
I was going to suggest automating it somehow, but I suppose there is no
way to differentiate between normal patches and ones from GitHub.
We could have all commits sent to the mailing list, e.g., like
[email protected] [1]. However, I do like submitting non-trivial
patches to the list for review before pushing. That would lead to the
same patch being sent twice on-list, which would probably become
annoying.
Collin
[1] https://lists.gnu.org/archive/html/emacs-diffs/
Automated emails are awkward for various spam protection reasons.
Anyway it's best to have some manual control to avoid
overwhelming the lists. I was err'ing on the side of
not sending already discussed PRs (on github) to this list,
but will err more on the side of sending the email when pushing.
BTW I use the attached script for pulling down a PR locally for
review/adjustment before pushing, as merging on github is ineffective
since we've only a mirror on github at present.
cheers,
Padraig
#!/bin/sh
set -e
url=$1
shift || { echo "Usage: ${0##*/} <github-pr-url> [git-am-flags...]" >&2; exit
1; }
pr_path=$(printf '%s' "$url" | sed -E
's|https?://github\.com/([^/]+/[^/]+/pull/[0-9]+).*|\1|')
[ "$pr_path" = "$url" ] && { echo "Invalid GitHub PR URL: $url" >&2; exit 1; }
pr_url="https://github.com/${pr_path}"
fetch() {
if command -v curl >/dev/null 2>&1; then
curl -fsSL "$1"
elif command -v wget >/dev/null 2>&1; then
wget -qO- "$1"
else
echo "curl or wget required" >&2; exit 1
fi
}
base=$(git rev-parse HEAD)
fetch "${pr_url}.patch" | git am "$@"
cmd='msg=$(git log -1 --format=%B) && '
cmd=$cmd'new_msg=$(printf "%s\n" "$msg" | '
cmd=$cmd'git interpret-trailers --no-divider '
cmd=$cmd'--if-exists=addIfDifferent '
cmd=$cmd'--trailer "Link: $PR_URL") && '
cmd=$cmd'{ test "$msg" = "$new_msg" || printf "%s\n" "$new_msg" | '
cmd=$cmd'git commit --amend -F -; }'
PR_URL=$pr_url GIT_SEQUENCE_EDITOR='true' git rebase -i "$base" --exec "$cmd"