blob: 9a47b4c397cec8e6782962bfe6766eee48b78ce1 [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 Hamano8c5802d2007-11-15 00:13:3611'git-cvsexportcommit' [-h] [-u] [-v] [-c] [-P] [-p] [-a] [-d cvsroot] [-w cvsworkdir] [-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
68current directory is within a git repository.
69
Junio C Hamano1a4e8412005-12-27 08:17:2370-v::
71Verbose.
72
Junio C Hamano2e552442006-01-30 07:39:3073EXAMPLES
74--------
75
76Merge one patch into CVS::
77+
78------------
79$ export GIT_DIR=~/project/.git
80$ cd ~/project_cvs_checkout
81$ git-cvsexportcommit -v <commit-sha1>
Junio C Hamano1974bf22007-10-31 05:57:2082$ cvs commit -F .msg <files>
Junio C Hamano2e552442006-01-30 07:39:3083------------
84
Junio C Hamano8c5802d2007-11-15 00:13:3685Merge one patch into CVS (-c and -w options). The working directory is within the Git Repo::
86+
87------------
88$ git-cvsexportcommit -v -c -w ~/project_cvs_checkout <commit-sha1>
89------------
90
Junio C Hamano6926bef2007-06-16 09:54:0591Merge pending patches into CVS automatically -- only if you really know what you are doing::
Junio C Hamano2e552442006-01-30 07:39:3092+
93------------
94$ export GIT_DIR=~/project/.git
95$ cd ~/project_cvs_checkout
96$ git-cherry cvshead myhead | sed -n 's/^+ //p' | xargs -l1 git-cvsexportcommit -c -p -v
97------------
98
Junio C Hamano1a4e8412005-12-27 08:17:2399Author
100------
Junio C Hamano8c5802d2007-11-15 00:13:36101Written by Martin Langhoff <martin@catalyst.net.nz> and others.
Junio C Hamano1a4e8412005-12-27 08:17:23102
103Documentation
104--------------
Junio C Hamano8c5802d2007-11-15 00:13:36105Documentation by Martin Langhoff <martin@catalyst.net.nz> and others.
Junio C Hamano1a4e8412005-12-27 08:17:23106
107GIT
108---
Junio C Hamano35738e82008-01-07 07:55:46109Part of the linkgit:git[7] suite