From owner-dev-commits-src-all@freebsd.org Thu Feb 18 16:00:55 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 578C453DFBA; Thu, 18 Feb 2021 16:00:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DhKF326Tmz4kbr; Thu, 18 Feb 2021 16:00:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3B02D1B25B; Thu, 18 Feb 2021 16:00:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 11IG0t4E086159; Thu, 18 Feb 2021 16:00:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11IG0tJ4086158; Thu, 18 Feb 2021 16:00:55 GMT (envelope-from git) Date: Thu, 18 Feb 2021 16:00:55 GMT Message-Id: <202102181600.11IG0tJ4086158@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: cd6114d1a65c - main - git-arc: Preserve the commit author when staging commits MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cd6114d1a65cda09410e91ed4dc220df825a8ba2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 16:00:55 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=cd6114d1a65cda09410e91ed4dc220df825a8ba2 commit cd6114d1a65cda09410e91ed4dc220df825a8ba2 Author: Mark Johnston AuthorDate: 2021-02-18 15:59:43 +0000 Commit: Mark Johnston CommitDate: 2021-02-18 16:00:09 +0000 git-arc: Preserve the commit author when staging commits Reported by: jhb --- tools/tools/git/git-arc.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/tools/git/git-arc.sh b/tools/tools/git/git-arc.sh index 2de7e1858c00..07b042ceb151 100644 --- a/tools/tools/git/git-arc.sh +++ b/tools/tools/git/git-arc.sh @@ -452,7 +452,7 @@ gitarc::patch() gitarc::stage() { - local branch commit commits diff reviewers tmp + local author branch commit commits diff reviewers tmp branch=main while getopts b: o; do @@ -488,12 +488,13 @@ gitarc::stage() fi printf "Differential Revision:\thttps://reviews.freebsd.org/${diff}" >> $tmp fi + author=$(git show -s --format='%an <%ae>' ${commit}) if ! git cherry-pick --no-commit ${commit}; then warn "Failed to apply $(git rev-parse --short ${commit}). Are you staging patches in the wrong order?" git checkout -f break fi - git commit --edit --file $tmp + git commit --edit --file $tmp --author "${author}" done }