blob: 5fa91e51ad70c3fed2bf3170bf14268f410aec5f [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 Hamanodfccbb02008-05-26 01:16:1411'git-cvsexportcommit' [-h] [-u] [-v] [-c] [-P] [-p] [-a] [-d cvsroot] [-w cvsworkdir] [-W] [-f] [-m msgprefix] [PARENTCOMMIT] COMMITID
Junio C Hamano1a4e8412005-12-27 08:17:2312
13
14DESCRIPTION
15-----------
16Exports a commit from GIT to a CVS checkout, making it easier
Junio C Hamanoa77a5132007-06-08 16:13:4417to merge patches from a git repository into a CVS repository.
Junio C Hamano1a4e8412005-12-27 08:17:2318
Junio C Hamano8c5802d2007-11-15 00:13:3619Specify the name of a CVS checkout using the -w switch or execute it
20from the root of the CVS working copy. In the latter case GIT_DIR must
21be defined. See examples below.
Junio C Hamano1a4e8412005-12-27 08:17:2322
Junio C Hamanoa77a5132007-06-08 16:13:4423It does its best to do the safe thing, it will check that the files are
24unchanged and up to date in the CVS checkout, and it will not autocommit
Junio C Hamano1a4e8412005-12-27 08:17:2325by default.
26
27Supports file additions, removals, and commits that affect binary files.
28
Junio C Hamano3d30fd52007-05-08 00:32:5329If the commit is a merge commit, you must tell git-cvsexportcommit what parent
Junio C Hamanoa77a5132007-06-08 16:13:4430should the changeset be done against.
Junio C Hamano1a4e8412005-12-27 08:17:2331
32OPTIONS
33-------
34
35-c::
36Commit automatically if the patch applied cleanly. It will not
37commit if any hunks fail to apply or there were other problems.
38
39-p::
Junio C Hamano75cc4c92006-07-24 08:25:0340Be pedantic (paranoid) when applying patches. Invokes patch with
Junio C Hamano1a4e8412005-12-27 08:17:2341--fuzz=0
42
Junio C Hamano75cc4c92006-07-24 08:25:0343-a::
44Add authorship information. Adds Author line, and Committer (if
45different from Author) to the message.
46
Junio C Hamano118d2772007-02-21 20:24:1047-d::
48Set an alternative CVSROOT to use. This corresponds to the CVS
49-d parameter. Usually users will not want to set this, except
50if using CVS in an asymmetric fashion.
51
Junio C Hamano0fd4dbd2006-05-14 09:22:5252-f::
53Force the merge even if the files are not up to date.
54
Junio C Hamano42f855f2007-02-06 00:09:3855-P::
56Force the parent commit, even if it is not a direct parent.
57
Junio C Hamano0fd4dbd2006-05-14 09:22:5258-m::
Junio C Hamanoa77a5132007-06-08 16:13:4459Prepend the commit message with the provided prefix.
Junio C Hamano0fd4dbd2006-05-14 09:22:5260Useful for patch series and the like.
61
Junio C Hamano591dc6a2007-05-29 09:18:1962-u::
Junio C Hamanoa6387422007-08-25 03:54:2763Update affected files from CVS repository before attempting export.
Junio C Hamano591dc6a2007-05-29 09:18:1964
Junio C Hamano8c5802d2007-11-15 00:13:3665-w::
66Specify the location of the CVS checkout to use for the export. This
67option does not require GIT_DIR to be set before execution if the
Junio C Hamanofeeb1be2008-05-22 00:53:3568current directory is within a git repository. The default is the
69value of 'cvsexportcommit.cvsdir'.
Junio C Hamano8c5802d2007-11-15 00:13:3670
Junio C Hamanodfccbb02008-05-26 01:16:1471-W::
72Tell cvsexportcommit that the current working directory is not only
73a Git checkout, but also the CVS checkout. Therefore, Git will
74reset the working directory to the parent commit before proceeding.
75
Junio C Hamano1a4e8412005-12-27 08:17:2376-v::
77Verbose.
78
Junio C Hamanofeeb1be2008-05-22 00:53:3579CONFIGURATION
80-------------
81cvsexportcommit.cvsdir::
82The default location of the CVS checkout to use for the export.
83
Junio C Hamano2e552442006-01-30 07:39:3084EXAMPLES
85--------
86
87Merge one patch into CVS::
88+
89------------
90$ export GIT_DIR=~/project/.git
91$ cd ~/project_cvs_checkout
92$ git-cvsexportcommit -v <commit-sha1>
Junio C Hamano1974bf22007-10-31 05:57:2093$ cvs commit -F .msg <files>
Junio C Hamano2e552442006-01-30 07:39:3094------------
95
Junio C Hamano8c5802d2007-11-15 00:13:3696Merge one patch into CVS (-c and -w options). The working directory is within the Git Repo::
97+
98------------
99$ git-cvsexportcommit -v -c -w ~/project_cvs_checkout <commit-sha1>
100------------
101
Junio C Hamano6926bef2007-06-16 09:54:05102Merge pending patches into CVS automatically -- only if you really know what you are doing::
Junio C Hamano2e552442006-01-30 07:39:30103+
104------------
105$ export GIT_DIR=~/project/.git
106$ cd ~/project_cvs_checkout
107$ git-cherry cvshead myhead | sed -n 's/^+ //p' | xargs -l1 git-cvsexportcommit -c -p -v
108------------
109
Junio C Hamano1a4e8412005-12-27 08:17:23110Author
111------
Junio C Hamano8c5802d2007-11-15 00:13:36112Written by Martin Langhoff <martin@catalyst.net.nz> and others.
Junio C Hamano1a4e8412005-12-27 08:17:23113
114Documentation
115--------------
Junio C Hamano8c5802d2007-11-15 00:13:36116Documentation by Martin Langhoff <martin@catalyst.net.nz> and others.
Junio C Hamano1a4e8412005-12-27 08:17:23117
118GIT
119---
Junio C Hamanof7c042d2008-06-06 22:50:53120Part of the linkgit:git[1] suite