'\" t
.\" Title: stg-edit
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.78.1
.\" Date: 03/26/2014
.\" Manual: StGit Manual
.\" Source: StGit
.\" Language: English
.\"
.TH "STG\-EDIT" "1" "03/26/2014" "StGit" "StGit Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
stg-edit \- Edit a patch description or diff
.SH "SYNOPSIS"
.sp
.nf
\fIstg\fR edit [options] [\-\-] []
.fi
.SH "DESCRIPTION"
Edit the description and author information of the given patch (or the current patch if no patch name was given)\&. With \-\-diff, also edit the diff\&.
The editor is invoked with the following contents:
.sp
.if n \{\
.RS 4
.\}
.nf
From: A U Thor
Date: creation date
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
Patch description
.fi
.if n \{\
.RE
.\}
.sp
If \-\-diff was specified, the diff appears at the bottom, after a separator:
.sp
.if n \{\
.RS 4
.\}
.nf
\-\-\-
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
Diff text
.fi
.if n \{\
.RE
.\}
.sp
Command\-line options can be used to modify specific information without invoking the editor\&. (With the \-\-edit option, the editor is invoked even if such command\-line options are given\&.)
If the patch diff is edited but does not apply, no changes are made to the patch at all\&. The edited patch is saved to a file which you can feed to "stg edit \-\-file", once you have made sure it does apply\&.
With \-\-set\-tree you set the git tree of the patch to the specified TREE\-ISH without changing the tree of any other patches\&. When used on the top patch, the index and work tree will be updated to match the tree\&. This low\-level option is primarily meant to be used by tools built on top of StGit, such as the Emacs mode\&. See also the \-\-set\-tree flag of stg push\&.
.SH "OPTIONS"
.PP
\-d, \-\-diff
.RS 4
Edit the patch diff\&.
.RE
.PP
\-e, \-\-edit
.RS 4
Invoke interactive editor\&.
.RE
.PP
\-\-sign
.RS 4
Add a "Signed\-off\-by:" to the end of the patch\&.
.RE
.PP
\-\-ack
.RS 4
Add an "Acked\-by:" line to the end of the patch\&.
.RE
.PP
\-m MESSAGE, \-\-message MESSAGE
.RS 4
Use MESSAGE instead of invoking the editor\&.
.RE
.PP
\-f FILE, \-\-file FILE
.RS 4
Use the contents of FILE instead of invoking the editor\&. (If FILE is "\-", write to stdout\&.)
.RE
.PP
\-\-save\-template FILE
.RS 4
Instead of running the command, just write the message template to FILE, and exit\&. (If FILE is "\-", write to stdout\&.)
When driving StGit from another program, it is often useful to first call a command with \fI\-\-save\-template\fR, then let the user edit the message, and then call the same command with \fI\-\-file\fR\&.
.RE
.PP
\-\-author "NAME "
.RS 4
Set the author details\&.
.RE
.PP
\-\-authname NAME
.RS 4
Set the author name\&.
.RE
.PP
\-\-authemail EMAIL
.RS 4
Set the author email\&.
.RE
.PP
\-\-authdate DATE
.RS 4
Set the author date\&.
.RE
.PP
\-O OPTIONS, \-\-diff\-opts OPTIONS
.RS 4
Extra options to pass to "git diff"\&.
.RE
.PP
\-t TREE\-ISH, \-\-set\-tree TREE\-ISH
.RS 4
Set the git tree of the patch to TREE\-ISH\&.
.RE
.SH "STGIT"
Part of the StGit suite \- see \fBstg\fR(1)