Date: Wed, 3 Mar 2021 22:01:26 GMT From: Mark Johnston <markj@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: c49b075305a7 - main - git-arc: Handle commit ranges in the "update" verb Message-ID: <202103032201.123M1Qah088306@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c49b075305a7aa1c7f500db1672cd1d2b8066b55 commit c49b075305a7aa1c7f500db1672cd1d2b8066b55 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2021-03-03 22:00:58 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2021-03-03 22:00:58 +0000 git-arc: Handle commit ranges in the "update" verb Reported by: imp --- tools/tools/git/git-arc.sh | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/tools/tools/git/git-arc.sh b/tools/tools/git/git-arc.sh index 07b042ceb151..c3541e438c9f 100644 --- a/tools/tools/git/git-arc.sh +++ b/tools/tools/git/git-arc.sh @@ -53,7 +53,7 @@ Commands: list <commit>|<commit range> patch <diff1> [<diff2> ...] stage [-b branch] [<commit>|<commit range>] - update <commit> + update [<commit>|<commit range>] Description: Create or manage FreeBSD Phabricator reviews based on git commits. There @@ -500,24 +500,24 @@ gitarc::stage() gitarc::update() { - local commit diff - - commit=$1 - diff=$(commit2diff $commit) - - if ! show_and_prompt $commit; then - return - fi + local commit commits diff + commits=$(build_commit_list $@) save_head + for commit in ${commits}; do + diff=$(commit2diff $commit) - git checkout -q $commit + if ! show_and_prompt $commit; then + break + fi - # The linter is stupid and applies patches to the working copy. - # This would be tolerable if it didn't try to correct "misspelled" variable - # names. - arc diff --allow-untracked --never-apply-patches --update $diff HEAD~ + git checkout -q $commit + # The linter is stupid and applies patches to the working copy. + # This would be tolerable if it didn't try to correct "misspelled" variable + # names. + arc diff --allow-untracked --never-apply-patches --update $diff HEAD~ + done restore_head }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202103032201.123M1Qah088306>