From nobody Fri Nov 19 02:50:50 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4857E189FA4E; Fri, 19 Nov 2021 02:50:51 +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 4HwLky73szz50MK; Fri, 19 Nov 2021 02:50:50 +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 CBC24206A7; Fri, 19 Nov 2021 02:50:50 +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 1AJ2ooO1095003; Fri, 19 Nov 2021 02:50:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ2ooFO095002; Fri, 19 Nov 2021 02:50:50 GMT (envelope-from git) Date: Fri, 19 Nov 2021 02:50:50 GMT Message-Id: <202111190250.1AJ2ooFO095002@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 964035c409b1 - main - git-arc: with "create" allow to specify parent of the first commit List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 964035c409b1b7229c7bc0220e7455e4a038ed4b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=964035c409b1b7229c7bc0220e7455e4a038ed4b commit 964035c409b1b7229c7bc0220e7455e4a038ed4b Author: Gleb Smirnoff AuthorDate: 2021-11-19 02:49:20 +0000 Commit: Gleb Smirnoff CommitDate: 2021-11-19 02:49:20 +0000 git-arc: with "create" allow to specify parent of the first commit Reviewed by: markj Differential revision: https://reviews.freebsd.org/D33045 --- tools/tools/git/git-arc.1 | 7 ++++++- tools/tools/git/git-arc.sh | 7 +++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/tools/tools/git/git-arc.1 b/tools/tools/git/git-arc.1 index b59f3eea17ca..984b1e8f32e5 100644 --- a/tools/tools/git/git-arc.1 +++ b/tools/tools/git/git-arc.1 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 14, 2021 +.Dd November 17, 2021 .Dt GIT-ARC 1 .Os .Sh NAME @@ -36,6 +36,7 @@ .Op Fl l .Op Fl r Ar reviewer1 Ns Op Cm \&, Ns Ar reviewer2 ... .Op Fl s Ar subscriber1 Ns Op Cm \&, Ns Ar subscriber2 ... +.Op Fl p Ar parent .Op Ar commit Ns | Ns Ar commit-range .Nm .Cm list Ar commit Ns | Ns Ar commit-range @@ -78,6 +79,10 @@ Argument(s) must be existing Phabricator user or group. .It Fl r Ar subscriber Add one or more subscribers, separated by commas, to revision(s) being created. Argument(s) must be existing Phabricator user or group. +.It Fl p Ar parent +Specify the parent of the first commit in the list. +This is useful when adding more commits on top of the already existing +stack in Phabricator. .El .It Cm list Print the associated Differential Revisions for the specified commits. diff --git a/tools/tools/git/git-arc.sh b/tools/tools/git/git-arc.sh index 0c288e7ac6e2..35a815ece137 100644 --- a/tools/tools/git/git-arc.sh +++ b/tools/tools/git/git-arc.sh @@ -356,15 +356,19 @@ gitarc__create() local commit commits doprompt list o prev reviewers subscribers list= + prev="" if [ "$(git config --bool --get arc.list 2>/dev/null || echo false)" != "false" ]; then list=1 fi doprompt=1 - while getopts lr:s: o; do + while getopts lp:r:s: o; do case "$o" in l) list=1 ;; + p) + prev="$OPTARG" + ;; r) reviewers="$OPTARG" ;; @@ -391,7 +395,6 @@ gitarc__create() fi save_head - prev="" for commit in ${commits}; do if create_one_review "$commit" "$reviewers" "$subscribers" "$prev" \ "$doprompt"; then