blob: 2da8588f4fd6edb842a9824181165b3f043ec87b [file] [log] [blame]
Junio C Hamano1a4e8412005-12-27 08:17:231git-cvsexportcommit(1)
2======================
3
4NAME
5----
Junio C Hamano7c73c662007-01-19 00:37:506git-cvsexportcommit - Export a single commit to a CVS checkout
Junio C Hamano1a4e8412005-12-27 08:17:237
8
9SYNOPSIS
10--------
Junio C Hamanofce7c7e2008-07-02 03:06:3811'git cvsexportcommit' [-h] [-u] [-v] [-c] [-P] [-p] [-a] [-d cvsroot]
12[-w cvsworkdir] [-W] [-f] [-m msgprefix] [PARENTCOMMIT] COMMITID
Junio C Hamano1a4e8412005-12-27 08:17:2313
14
15DESCRIPTION
16-----------
17Exports a commit from GIT to a CVS checkout, making it easier
Junio C Hamanoa77a5132007-06-08 16:13:4418to merge patches from a git repository into a CVS repository.
Junio C Hamano1a4e8412005-12-27 08:17:2319
Junio C Hamano8c5802d2007-11-15 00:13:3620Specify the name of a CVS checkout using the -w switch or execute it
21from the root of the CVS working copy. In the latter case GIT_DIR must
22be defined. See examples below.
Junio C Hamano1a4e8412005-12-27 08:17:2323
Junio C Hamanoa77a5132007-06-08 16:13:4424It does its best to do the safe thing, it will check that the files are
25unchanged and up to date in the CVS checkout, and it will not autocommit
Junio C Hamano1a4e8412005-12-27 08:17:2326by default.
27
28Supports file additions, removals, and commits that affect binary files.
29
Junio C Hamanoba4b9282008-07-06 05:20:3130If the commit is a merge commit, you must tell 'git-cvsexportcommit' what
Junio C Hamanofce7c7e2008-07-02 03:06:3831parent the changeset should be done against.
Junio C Hamano1a4e8412005-12-27 08:17:2332
33OPTIONS
34-------
35
36-c::
37Commit automatically if the patch applied cleanly. It will not
38commit if any hunks fail to apply or there were other problems.
39
40-p::
Junio C Hamano75cc4c92006-07-24 08:25:0341Be pedantic (paranoid) when applying patches. Invokes patch with
Junio C Hamano1a4e8412005-12-27 08:17:2342--fuzz=0
43
Junio C Hamano75cc4c92006-07-24 08:25:0344-a::
45Add authorship information. Adds Author line, and Committer (if
46different from Author) to the message.
47
Junio C Hamano118d2772007-02-21 20:24:1048-d::
49Set an alternative CVSROOT to use. This corresponds to the CVS
50-d parameter. Usually users will not want to set this, except
51if using CVS in an asymmetric fashion.
52
Junio C Hamano0fd4dbd2006-05-14 09:22:5253-f::
54Force the merge even if the files are not up to date.
55
Junio C Hamano42f855f2007-02-06 00:09:3856-P::
57Force the parent commit, even if it is not a direct parent.
58
Junio C Hamano0fd4dbd2006-05-14 09:22:5259-m::
Junio C Hamanoa77a5132007-06-08 16:13:4460Prepend the commit message with the provided prefix.
Junio C Hamano0fd4dbd2006-05-14 09:22:5261Useful for patch series and the like.
62
Junio C Hamano591dc6a2007-05-29 09:18:1963-u::
Junio C Hamanoa6387422007-08-25 03:54:2764Update affected files from CVS repository before attempting export.
Junio C Hamano591dc6a2007-05-29 09:18:1965
Junio C Hamano8c5802d2007-11-15 00:13:3666-w::
67Specify the location of the CVS checkout to use for the export. This
68option does not require GIT_DIR to be set before execution if the
Junio C Hamanofeeb1be2008-05-22 00:53:3569current directory is within a git repository. The default is the
70value of 'cvsexportcommit.cvsdir'.
Junio C Hamano8c5802d2007-11-15 00:13:3671
Junio C Hamanodfccbb02008-05-26 01:16:1472-W::
73Tell cvsexportcommit that the current working directory is not only
74a Git checkout, but also the CVS checkout. Therefore, Git will
75reset the working directory to the parent commit before proceeding.
76
Junio C Hamano1a4e8412005-12-27 08:17:2377-v::
78Verbose.
79
Junio C Hamanofeeb1be2008-05-22 00:53:3580CONFIGURATION
81-------------
82cvsexportcommit.cvsdir::
83The default location of the CVS checkout to use for the export.
84
Junio C Hamano2e552442006-01-30 07:39:3085EXAMPLES
86--------
87
88Merge one patch into CVS::
89+
90------------
91$ export GIT_DIR=~/project/.git
92$ cd ~/project_cvs_checkout
Junio C Hamanofce7c7e2008-07-02 03:06:3893$ git cvsexportcommit -v <commit-sha1>
Junio C Hamano1974bf22007-10-31 05:57:2094$ cvs commit -F .msg <files>
Junio C Hamano2e552442006-01-30 07:39:3095------------
96
Junio C Hamano8c5802d2007-11-15 00:13:3697Merge one patch into CVS (-c and -w options). The working directory is within the Git Repo::
98+
99------------
Junio C Hamanofce7c7e2008-07-02 03:06:38100$ git cvsexportcommit -v -c -w ~/project_cvs_checkout <commit-sha1>
Junio C Hamano8c5802d2007-11-15 00:13:36101------------
102
Junio C Hamano6926bef2007-06-16 09:54:05103Merge pending patches into CVS automatically -- only if you really know what you are doing::
Junio C Hamano2e552442006-01-30 07:39:30104+
105------------
106$ export GIT_DIR=~/project/.git
107$ cd ~/project_cvs_checkout
Junio C Hamanofce7c7e2008-07-02 03:06:38108$ git cherry cvshead myhead | sed -n 's/^+ //p' | xargs -l1 git cvsexportcommit -c -p -v
Junio C Hamano2e552442006-01-30 07:39:30109------------
110
Junio C Hamano1a4e8412005-12-27 08:17:23111Author
112------
Junio C Hamano8c5802d2007-11-15 00:13:36113Written by Martin Langhoff <martin@catalyst.net.nz> and others.
Junio C Hamano1a4e8412005-12-27 08:17:23114
115Documentation
116--------------
Junio C Hamano8c5802d2007-11-15 00:13:36117Documentation by Martin Langhoff <martin@catalyst.net.nz> and others.
Junio C Hamano1a4e8412005-12-27 08:17:23118
119GIT
120---
Junio C Hamanof7c042d2008-06-06 22:50:53121Part of the linkgit:git[1] suite