+++ /dev/null
-GIT-MR-MBOX(1)
-==============
-:doctype: manpage
-
-
-NAME
-----
-git-mr-mbox - Generate mbox for merge request(s) and print it to stdout
-
-
-SYNOPSIS
---------
-*git-mr-mbox* ['OPTIONS'] ['MR' ['MR' ...]]
-
-
-DESCRIPTION
------------
-This command, if used in combination with 'git-mr-fetch', 'git-mr-push'
-and 'git-mr-sendmail' provides a possibility to do MR reviews in email
-based form, using your favorite MUA like Mutt. It generates mbox file
-from 'head' and 'mbox' refs stored in the 'mrs' refs namespace. This
-replaces fetching mail from SMTP server and mbox is generated from data
-stored in git only.
-
-Please check the *MUTT* section to see one of possible and basic
-setups.
-
-OPTIONS
--------
-*-A, --all*::
- Generate mbox for all MRs. MRs entered as positional arguments or
- on *-* stdin are ignored.
-
-*-, --stdin*::
- Read MRs from stdin. MRs entered as positional arguments are ignored.
-
-*-r, --read-refs* 'FILE'::
- Read refs from 'FILE'. If used, mbox is generated only for refs not
- presented in 'FILE'. This can be used to generate mbox for new MRs and
- new comments only, simulating fetching of new mail from SMTP server.
-
-*-w, --write-refs* 'FILE'::
- Write refs for MRs and comments in the generated mbox to a 'FILE'. It
- can be the same 'FILE' as for the *-r* option. You can incrementaly
- update the mbox by specifying both *-r* and *-w* options and using the
- same 'FILE.' Only newly added or updated refs are changed.
-
-*-m, --mbox* 'FILE'::
- Append mbox to 'FILE' instead of writing it to stdout.
-
-
-MUTT
-----
-This section provides basic Mutt setup for MR reviews.
-
-Basic Mutt config file that can be used. For the purpose
-of this example, please store it as '~/.gimrr/muttrc'.
-----
-set realname = "your name"
-set from = "your email address"
-set sendmail = "git mr-sendmail"
-set sort = threads
-set timeout = 10
-----
-
-Add the following aliases to your git config.
-----
-mr-mutt = "!sh -c 'dir=${HOME}/.gimrr; mkdir -p $dir && \
- mr=$(git rev-parse --verify ${1:-HEAD}) && \
- git mr-mbox -m ${dir}/${mr}.mbox -r ${dir}/${mr}.refs -w ${dir}/${mr}.refs $mr \
- && mutt -f ${dir}/${mr}.mbox -F ${dir}/muttrc'" git-mr-review
-
-mr-mutt-all = "!sh -c 'dir=${HOME}/.gimrr; mkdir -p $dir && \
- git mr-mbox -A -m ${dir}/all.mbox -r ${dir}/all.refs -w ${dir}/all.refs && \
- mutt -f ${dir}/all.mbox -F ${dir}/muttrc'" git-mr-review-all
-----
-
-The 'git-mr-mutt' alias will generate mbox and start Mutt for current
-MR(HEAD). You can pass it MR sha1 as argument to review a different MR.
-The 'git-mr-mutt-all' alias generates mbox for all MRs
-in the current git repo. You can also easily reply to patches or comments
-from others from within git, because 'git-mr-sendmail' is set for mail
-delivery.
-
-Note that your replies and MRs are created localy and you need to push them.
-The same goes for changes made by others. You need to fetch them. Hence
-you should run 'git mr-fetch -A' and 'git mr-push -A --mbox' at some point.
-
-You can use something like following in cron job or loop to simulate mail
-synchronization for all MRs in specific repo.
-----
-REPO="path to git repo"
-NAME="myrepo"
-DIR="${HOME}/.gimrr"
-git -C "REPO" mr-fetch -A
-git -C "REPO" mr-push -A --mbox
-git -C mr-mbox -A -m $(DIR)/$(NAME).mbox -r $(DIR)/$(NAME).refs -w $(DIR)/$(NAME).refs`
-----
-
-EXAMPLES
---------
-`$ git mr-mbox MR1 MR2`::
- Generate mbox for MR1 and MR2 to stdout.
-
-`$ git mr-mbox`::
- Generate mbox for current MR(HEAD) to stdout.
-
-`$ git mr-mbox -m mbox`::
- Same as above but store the mbox to 'mbox' file.
-
-`$ git mr-mbox -A -m mbox`::
- Generate 'mbox' file for all available MRs and their comments.
-
-`$ git mr-mbox -A -m mbox -r mbox.refs -w mbox.refs`::
- Same as above, but also reads and stores refs for which
- the 'mbox' file was generated. It can be called repeatedly
- and only new MRs and comments will be appended to mbox.
- Note the this should be used along with 'git-mr-fetch' to
- actually get the chages from server, even though your unpushed
- MRs and comments will be available right away.
-
-
-SEE ALSO
---------
-link:git-mr.html[git-mr(1)]