blob: 7f79cec3f8e9f90f61e461521eed2ca23fba69d1 [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 Hamano15567bc2011-07-23 00:51:5911[verse]
Junio C Hamanofce7c7e2008-07-02 03:06:3812'git cvsexportcommit' [-h] [-u] [-v] [-c] [-P] [-p] [-a] [-d cvsroot]
13[-w cvsworkdir] [-W] [-f] [-m msgprefix] [PARENTCOMMIT] COMMITID
Junio C Hamano1a4e8412005-12-27 08:17:2314
15
16DESCRIPTION
17-----------
18Exports a commit from GIT to a CVS checkout, making it easier
Junio C Hamanoa77a5132007-06-08 16:13:4419to merge patches from a git repository into a CVS repository.
Junio C Hamano1a4e8412005-12-27 08:17:2320
Junio C Hamano8c5802d2007-11-15 00:13:3621Specify the name of a CVS checkout using the -w switch or execute it
22from the root of the CVS working copy. In the latter case GIT_DIR must
23be defined. See examples below.
Junio C Hamano1a4e8412005-12-27 08:17:2324
Junio C Hamanoa77a5132007-06-08 16:13:4425It does its best to do the safe thing, it will check that the files are
26unchanged and up to date in the CVS checkout, and it will not autocommit
Junio C Hamano1a4e8412005-12-27 08:17:2327by default.
28
29Supports file additions, removals, and commits that affect binary files.
30
Junio C Hamano1aa40d22010-01-21 17:46:4331If the commit is a merge commit, you must tell 'git cvsexportcommit' what
Junio C Hamanofce7c7e2008-07-02 03:06:3832parent the changeset should be done against.
Junio C Hamano1a4e8412005-12-27 08:17:2333
34OPTIONS
35-------
36
37-c::
38Commit automatically if the patch applied cleanly. It will not
39commit if any hunks fail to apply or there were other problems.
40
41-p::
Junio C Hamano75cc4c92006-07-24 08:25:0342Be pedantic (paranoid) when applying patches. Invokes patch with
Junio C Hamano1a4e8412005-12-27 08:17:2343--fuzz=0
44
Junio C Hamano75cc4c92006-07-24 08:25:0345-a::
46Add authorship information. Adds Author line, and Committer (if
47different from Author) to the message.
48
Junio C Hamano118d2772007-02-21 20:24:1049-d::
50Set an alternative CVSROOT to use. This corresponds to the CVS
51-d parameter. Usually users will not want to set this, except
52if using CVS in an asymmetric fashion.
53
Junio C Hamano0fd4dbd2006-05-14 09:22:5254-f::
55Force the merge even if the files are not up to date.
56
Junio C Hamano42f855f2007-02-06 00:09:3857-P::
58Force the parent commit, even if it is not a direct parent.
59
Junio C Hamano0fd4dbd2006-05-14 09:22:5260-m::
Junio C Hamanoa77a5132007-06-08 16:13:4461Prepend the commit message with the provided prefix.
Junio C Hamano0fd4dbd2006-05-14 09:22:5262Useful for patch series and the like.
63
Junio C Hamano591dc6a2007-05-29 09:18:1964-u::
Junio C Hamanoa6387422007-08-25 03:54:2765Update affected files from CVS repository before attempting export.
Junio C Hamano591dc6a2007-05-29 09:18:1966
Junio C Hamanof43de602009-06-18 20:54:1067-k::
68Reverse CVS keyword expansion (e.g. $Revision: 1.2.3.4$
69becomes $Revision$) in working CVS checkout before applying patch.
70
Junio C Hamano8c5802d2007-11-15 00:13:3671-w::
72Specify the location of the CVS checkout to use for the export. This
73option does not require GIT_DIR to be set before execution if the
Junio C Hamanofeeb1be2008-05-22 00:53:3574current directory is within a git repository. The default is the
75value of 'cvsexportcommit.cvsdir'.
Junio C Hamano8c5802d2007-11-15 00:13:3676
Junio C Hamanodfccbb02008-05-26 01:16:1477-W::
78Tell cvsexportcommit that the current working directory is not only
79a Git checkout, but also the CVS checkout. Therefore, Git will
80reset the working directory to the parent commit before proceeding.
81
Junio C Hamano1a4e8412005-12-27 08:17:2382-v::
83Verbose.
84
Junio C Hamanofeeb1be2008-05-22 00:53:3585CONFIGURATION
86-------------
87cvsexportcommit.cvsdir::
88The default location of the CVS checkout to use for the export.
89
Junio C Hamano2e552442006-01-30 07:39:3090EXAMPLES
91--------
92
93Merge one patch into CVS::
94+
95------------
96$ export GIT_DIR=~/project/.git
97$ cd ~/project_cvs_checkout
Junio C Hamanofce7c7e2008-07-02 03:06:3898$ git cvsexportcommit -v <commit-sha1>
Junio C Hamano1974bf22007-10-31 05:57:2099$ cvs commit -F .msg <files>
Junio C Hamano2e552442006-01-30 07:39:30100------------
101
Junio C Hamano8c5802d2007-11-15 00:13:36102Merge one patch into CVS (-c and -w options). The working directory is within the Git Repo::
103+
104------------
Junio C Hamanofce7c7e2008-07-02 03:06:38105$ git cvsexportcommit -v -c -w ~/project_cvs_checkout <commit-sha1>
Junio C Hamano8c5802d2007-11-15 00:13:36106------------
107
Junio C Hamano6926bef2007-06-16 09:54:05108Merge pending patches into CVS automatically -- only if you really know what you are doing::
Junio C Hamano2e552442006-01-30 07:39:30109+
110------------
111$ export GIT_DIR=~/project/.git
112$ cd ~/project_cvs_checkout
Junio C Hamanofce7c7e2008-07-02 03:06:38113$ git cherry cvshead myhead | sed -n 's/^+ //p' | xargs -l1 git cvsexportcommit -c -p -v
Junio C Hamano2e552442006-01-30 07:39:30114------------
115
Junio C Hamano1a4e8412005-12-27 08:17:23116GIT
117---
Junio C Hamanof7c042d2008-06-06 22:50:53118Part of the linkgit:git[1] suite