From owner-dev-commits-src-main@freebsd.org Fri Feb 12 20:58:27 2021 Return-Path: Delivered-To: dev-commits-src-main@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 62D31530F4C; Fri, 12 Feb 2021 20:58:27 +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 4Dcm771Y8hz3w6T; Fri, 12 Feb 2021 20:58:27 +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 288012A09; Fri, 12 Feb 2021 20:58:27 +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 11CKwRNa028848; Fri, 12 Feb 2021 20:58:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11CKwRQO028847; Fri, 12 Feb 2021 20:58:27 GMT (envelope-from git) Date: Fri, 12 Feb 2021 20:58:27 GMT Message-Id: <202102122058.11CKwRQO028847@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: 62374dfa0f0d - main - git-arc: Use a separate message file 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: 62374dfa0f0dba4fcb4cb6106af3c2019b8447c7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Feb 2021 20:58:27 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=62374dfa0f0dba4fcb4cb6106af3c2019b8447c7 commit 62374dfa0f0dba4fcb4cb6106af3c2019b8447c7 Author: Mark Johnston AuthorDate: 2021-02-12 20:58:17 +0000 Commit: Mark Johnston CommitDate: 2021-02-12 20:58:17 +0000 git-arc: Use a separate message file Rather than putting revision metadata in .git/arc/create-message, create a tmpfile and use that. Otherwise arc diff always prompts about it and in some cases complains because its standard input is piped. Reported by: imp Differential Revision: https://reviews.freebsd.org/D28614 --- tools/tools/git/git-arc.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tools/tools/git/git-arc.sh b/tools/tools/git/git-arc.sh index 3b85d851319f..e8c84ea672f7 100644 --- a/tools/tools/git/git-arc.sh +++ b/tools/tools/git/git-arc.sh @@ -217,7 +217,7 @@ commit2diff() create_one_review() { - local childphid commit dir doprompt msg parent parentphid reviewers + local childphid commit doprompt msg parent parentphid reviewers local subscribers commit=$1 @@ -232,10 +232,7 @@ create_one_review() git checkout -q $commit - dir=$(git rev-parse --git-dir)/arc - mkdir -p "$dir" - - msg=${dir}/create-message + msg=$(mktemp) git show -s --format='%B' $commit > $msg printf "\nTest Plan:\n" >> $msg printf "\nReviewers:\n" >> $msg @@ -244,7 +241,7 @@ create_one_review() printf "${subscribers}\n" >> $msg yes | env EDITOR=true \ - arc diff --never-apply-patches --create --allow-untracked $BROWSE HEAD~ + arc diff --message-file $msg --never-apply-patches --create --allow-untracked $BROWSE HEAD~ [ $? -eq 0 ] || err "could not create Phabricator diff" if [ -n "$parent" ]; then @@ -263,6 +260,7 @@ create_one_review() ]}' | arc call-conduit -- differential.revision.edit >&3 fi + rm -f $msg return 0 }