blob: fbf2f671e9fb5cc38dcd578f9e49e9204c247463 [file] [log] [blame]
stg-new(1)
==========
Yann Dirson <ydirson@altern.org>
v0.12.1, February 2007
NAME
----
stg-new - stgdesc:new[]
SYNOPSIS
--------
[verse]
'stg' new [OPTIONS] [name]
DESCRIPTION
-----------
Create a new, empty patch with the given <name> on the current stack.
The new patch is created on top of the currently applied patches, and
is made the new top of the stack. The local changes in the working
tree are not included in the patch. A stglink:refresh[] command is
needed for this.
The given <name> must be unique in the stack, and may only contain
alphanumeric characters, dashes and underscores. If no name is given,
one is generated from the first line of the commit message.
An editor will be launched to edit the commit message to be used for
the patch, unless the '--message' flag already specified one. The
'patchdescr.tmpl' template file is used if available to pre-fill the
editor. The editor to use is taken from the first of the following
sources of information, and defaults to 'vi':
. the 'stgit.editor' GIT configuration variable
. the 'EDITOR' environment variable
The message and other GIT commit attributes can be modified later
using stglink:refresh[].
AUTHOR AND COMMITTER INFORMATION
--------------------------------
The author name (resp. email) to record in the StGIT patch is taken
from the first of the following sources for the information:
. the '--authname' (resp. '--authemail') or '--author' flag on command-line
. the 'GIT_AUTHOR_NAME' (resp. 'GIT_AUTHOR_EMAIL') environment variable
. the 'user.name' (resp. 'user.email') GIT configuration variable
Similarly, the committer name (resp. email) is taken from the first of
the following sources:
. the '--commname' (resp. '--commemail') flag on command-line
. the 'GIT_COMMITTER_NAME' (resp. 'GIT_COMMITTER_EMAIL') environment variable
. the 'user.name' (resp. 'user.email') GIT configuration variable
The GIT commit generated by stglink:refresh[] will use these
informations when available. If one of them is not available, GIT
will pick the value from your machine's configuration at that time, as
described in gitlink:git-commit-tree[1].
OPTIONS
-------
--message=<message>::
-m <message>::
Use <message> as the patch description.
--showpatch::
-s::
Show the patch content in the editor buffer. This flag does
nothing if '-m' is also specified.
--author="Name <email@company>"::
-a "Name <email@company>"::
Use "Name <email@company>" as the author details. This form
sets both 'authname' and 'authemail'.
--authname=<name>::
Use <name> as the author name
--authemail=<email>::
Use <email> as the author e-mail
--authdate=<date>::
Use <date> as the author date
--commname=<name>::
Use <name> as the committer name
--commemail=<email>::
Use <email> as the committer e-mail
FILES
-----
<templates>/patchdescr.tmpl
ENVIRONMENT VARIABLES
---------------------
GIT_AUTHOR_NAME
GIT_AUTHOR_EMAIL
GIT_AUTHOR_DATE
GIT_COMMITTER_NAME
GIT_COMMITTER_EMAIL
EDITOR
GIT CONFIGURATION VARIABLES
---------------------------
user.name
user.email
stgit.editor
StGIT
-----
Part of the StGIT suite - see gitlink:stg[1].