Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
GIT-ARC(1)		    General Commands Manual		    GIT-ARC(1)

NAME
       git arc -- a wrapper to improve integration between git and arcanist

SYNOPSIS
       git     arc     create	  [-l]	  [-r	 reviewer1[,reviewer2	 ...]]
	   [-s	 subscriber1[,subscriber2   ...]]   [-p	  parent]   commit-ref
	   [commit-ref ...]
       git arc list commit-ref [commit-ref ...]
       git arc patch [-bcrs] diff1 [diff2 [...]]
       git arc stage [-b branch] commit-ref [commit-ref	...]
       git arc update [-l] [-m message]	commit-ref [commit-ref ...]

DESCRIPTION
       The  git	 arc  utility  creates and manages FreeBSD Phabricator reviews
       based on	git commits.  It is geared towards  FreeBSD  development.   It
       requires	 the  devel/git,  devel/arcanist-lib and textproc/jq packages;
       these will be installed automatically if	git arc	is installed  via  the
       devel/freebsd-git-arc package.

       git  arc	assumes	a one-to-one relationship between git commits and Dif-
       ferential Revisions, and	requires the titles in a pair to match.	  Com-
       mit  titles must	therefore be unique across all open Differential Revi-
       sions authored by the submitter.	 If the	title of either	 a  commit  or
       its  associated Differential Revision is	changed, the other must	be up-
       dated manually to maintain the match.

       The first parameter must	be a verb.  Most verbs accept one or more  git
       commit  references:  commit hashes, branch names, commit	ranges,	and so
       on.  A branch name refers to the	single commit at its tip; use a	commit
       range to	operate	on multiple commits.  See git-rev-parse(1) for details
       on specifying commit references.	 The available verbs are:

       create  Create new Differential Revisions from the  specified  commits.
	       Accepts options:

	       -l	      Before processing	commit(s) display list of com-
			      mits to be processed and wait for	confirmation.

	       -r reviewer    Add  one or more reviewers, separated by commas,
			      to revision(s)  being  created.	Each  argument
			      must  be	an existing Phabricator	user or	group.
			      Note that	group reviewers	must be	specified  us-
			      ing  their  hashtag (e.g.	#jails for the "Jails"
			      group).

	       -s subscriber  Add one or more subscribers, separated  by  com-
			      mas,  to	revision(s) being created.  Each argu-
			      ment must	be an  existing	 Phabricator  user  or
			      group.

	       -p parent      Specify  the  parent  of the first commit	in the
			      list.  This is useful when adding	 more  commits
			      on top of	an already existing stack in Phabrica-
			      tor.

       list    Print  the  associated Differential Revisions for the specified
	       commits.

       patch   Try to apply patches from one or	more Differential Revision  to
	       the  currently checked out tree.	 The following options are ac-
	       cepted:

	       -b  Switch to a new branch before applying the patches.

	       -c  Commit each applied patch to	the git	checkout.  The	commit
		   message  and	 author	 are taken from	the Differential Revi-
		   sion.

	       -r  Rather than using the arc command to	apply the patch, down-
		   load	the raw	patch file and apply  it  using	 git-apply(1).
		   This	 is  useful for	avoiding some misfeatures of arc, par-
		   ticularly its behavior of trying to update all  remotes  in
		   the tree in some cases.

	       -s  Recursively	apply  the  parent  revisions of the specified
		   commit.  This can be	used to	apply patch stacks by specify-
		   ing the top-most, i.e., most	recent commit in the stack.

       stage   Prepare a series	of  commits  to	 be  pushed  to	 the  upstream
	       FreeBSD repository.

	       First, the target branch	is checked out;	by default this	is the
	       main  branch  but  can be overridden with the -b	option.	 Then,
	       the specified commits are cherry-picked with review tags	 added
	       to  the commit log message, and the log message is opened in an
	       editor for any final updates.  The commits need not have	 asso-
	       ciated Differential Revisions.

	       This  is	 intended  to  be used after code review has been com-
	       pleted, and the commits are ready to be pushed to  an  upstream
	       repository.

       update  Synchronize  the	 Differential  Revisions  associated  with the
	       specified commits.  Currently only the diff is updated; the re-
	       view description	and other metadata are not synchronized.  If a
	       message is specified with -m, that message is added as  a  note
	       to  the	Differential Revision.	If no message is supplied, the
	       user's editor will be opened to provide an update  message  for
	       each revision.  If an empty message is supplied via -m, then no
	       notes will be added when	updating Differential Revisions.

	       If  -l  is used,	display	list of	commits	to be updated and wait
	       for confirmation	of the list rather  than  prompting  for  each
	       commit.

CONFIGURATION
       These are manipulated by	git-config:

       arc.assume_yes  Assume a	"yes" answer to	all prompts instead of prompt-
		       ing  the	user.  Equivalent to the -y flag.  Defaults to
		       false.

       arc.browse      Try to open newly created reviews  in  a	 browser  tab.
		       Defaults	to false.

       arc.list	       Always use "list	mode" (-l) with	create and update.  In
		       this  mode,  the	list of	git revisions to use is	listed
		       with a single prompt before creating  or	 updating  re-
		       views.  The diffs for individual	commits	are not	shown.
		       Defaults	to false.

       arc.verbose     Always  use verbose output.  Equivalent to the -v flag.
		       Defaults	to false.

EXAMPLES
       The typical end-to-end usage looks something like this.

       Commit changes with a message and create	a Differential Review:

	     $ git commit -m "kern: Rewrite in Rust"
	     $ git arc create HEAD

       Make changes to the diff	based  on  review  feedback,  then  amend  the
       changes to the existing commit and update the Differential Review:

	     $ git commit --amend
	     $ git arc update HEAD

       Now  that  all  reviewers are happy, it is time to stage	the commit and
       push it:

	     $ git arc stage HEAD
	     $ git push	freebsd	HEAD:main

       Create a	Phabricator review using the contents of the most recent  com-
       mit in your git checkout:

	     $ git arc create -r markj,#jails HEAD

       The commit title	is used	as the review title, the commit	log message is
       used  as	 the review description, and <markj@FreeBSD.org> is added as a
       reviewer.  Also,	the "Jails" reviewer group is added using its hashtag.

       Create a	series of Phabricator reviews for each of  HEAD~2,  HEAD~  and
       HEAD:

	     $ git arc create HEAD~3..HEAD

       Pairs  of consecutive commits are linked	into a patch stack.  Note that
       the first commit	in the specified range is excluded.

       Create a	series of separate reviews for each of the following commits:

	     $ git arc create b409afcfedcdda ca03ed1345aff0

       Update the review corresponding to commit b409afcfedcdda:

	     $ git arc update b409afcfedcdda

       The title of the	commit must be the same	as it was when the review  was
       created.	  Note	that  the  review description is not automatically up-
       dated.

       Apply the patch in review D12345	to the currently checked-out tree, and
       stage it:

	     $ git arc patch D12345

       Apply the patch in review D23456	to the currently checked-out tree, and
       commit it to the	tree with the commit message in	the  review  and  make
       the  best guess for what	to use for author.  If the guess is considered
       unreliable, the user is prompted	to see if they	wish  to  use  it  (or
       abort).

	     $ git arc patch -c	D23456

       List the	status of reviews for all the commits in the branch "feature":

	     $ git arc list main..feature

       Update reviews for all commits in the branch "feature" after rebasing:

	     $ git arc update -lm "Rebase" main..feature

SEE ALSO
       build(7), development(7)

HISTORY
       The   git   arc	utility	 appeared  in  the  src	 tools	collection  in
       FreeBSD 14.0.

AUTHORS
       The git arc utility was written by  Mark	 Johnston  <markj@FreeBSD.org>
       and   the   manual   page   was	 written   by	Daniel	Ebdrup	Jensen
       <debdrup@FreeBSD.org>.

FreeBSD	ports 15.quarterly     February	10, 2026		    GIT-ARC(1)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=git-arc&sektion=1&manpath=FreeBSD+Ports+15.1.quarterly>

home | help