git-cvsexportcommit.txt 3.3 KB
Newer Older
1
git-cvsexportcommit(1)
2
======================
3 4 5

NAME
----
6
git-cvsexportcommit - Export a single commit to a CVS checkout
7 8 9 10


SYNOPSIS
--------
11 12
'git cvsexportcommit' [-h] [-u] [-v] [-c] [-P] [-p] [-a] [-d cvsroot]
	[-w cvsworkdir] [-W] [-f] [-m msgprefix] [PARENTCOMMIT] COMMITID
13 14 15 16 17


DESCRIPTION
-----------
Exports a commit from GIT to a CVS checkout, making it easier
Junio C Hamano's avatar
Junio C Hamano committed
18
to merge patches from a git repository into a CVS repository.
19

20 21 22
Specify the name of a CVS checkout using the -w switch or execute it
from the root of the CVS working copy. In the latter case GIT_DIR must
be defined. See examples below.
23

Junio C Hamano's avatar
Junio C Hamano committed
24 25
It does its best to do the safe thing, it will check that the files are
unchanged and up to date in the CVS checkout, and it will not autocommit
26 27 28 29
by default.

Supports file additions, removals, and commits that affect binary files.

30
If the commit is a merge commit, you must tell 'git-cvsexportcommit' what
31
parent the changeset should be done against.
32 33 34 35 36 37 38 39 40

OPTIONS
-------

-c::
	Commit automatically if the patch applied cleanly. It will not
	commit if any hunks fail to apply or there were other problems.

-p::
41
	Be pedantic (paranoid) when applying patches. Invokes patch with
42 43
	--fuzz=0

44 45 46 47
-a::
	Add authorship information. Adds Author line, and Committer (if
	different from Author) to the message.

48 49 50 51 52
-d::
	Set an alternative CVSROOT to use.  This corresponds to the CVS
	-d parameter.  Usually users will not want to set this, except
	if using CVS in an asymmetric fashion.

53 54 55
-f::
	Force the merge even if the files are not up to date.

56 57 58
-P::
	Force the parent commit, even if it is not a direct parent.

59
-m::
Junio C Hamano's avatar
Junio C Hamano committed
60
	Prepend the commit message with the provided prefix.
61 62
	Useful for patch series and the like.

63
-u::
64
	Update affected files from CVS repository before attempting export.
65

66 67 68 69
-k::
	Reverse CVS keyword expansion (e.g. $Revision: 1.2.3.4$
	becomes $Revision$) in working CVS checkout before applying patch.

70 71 72
-w::
	Specify the location of the CVS checkout to use for the export. This
	option does not require GIT_DIR to be set before execution if the
73 74
	current directory is within a git repository.  The default is the
	value of 'cvsexportcommit.cvsdir'.
75

76 77 78 79 80
-W::
	Tell cvsexportcommit that the current working directory is not only
	a Git checkout, but also the CVS checkout.  Therefore, Git will
	reset the working directory to the parent commit before proceeding.

81 82 83
-v::
	Verbose.

84 85 86 87 88
CONFIGURATION
-------------
cvsexportcommit.cvsdir::
	The default location of the CVS checkout to use for the export.

89 90 91 92 93 94 95 96
EXAMPLES
--------

Merge one patch into CVS::
+
------------
$ export GIT_DIR=~/project/.git
$ cd ~/project_cvs_checkout
97
$ git cvsexportcommit -v <commit-sha1>
98
$ cvs commit -F .msg <files>
99 100
------------

101 102 103
Merge one patch into CVS (-c and -w options). The working directory is within the Git Repo::
+
------------
104
	$ git cvsexportcommit -v -c -w ~/project_cvs_checkout <commit-sha1>
105 106
------------

107
Merge pending patches into CVS automatically -- only if you really know what you are doing::
108 109 110 111
+
------------
$ export GIT_DIR=~/project/.git
$ cd ~/project_cvs_checkout
112
$ git cherry cvshead myhead | sed -n 's/^+ //p' | xargs -l1 git cvsexportcommit -c -p -v
113 114
------------

115 116
Author
------
117
Written by Martin Langhoff <[email protected]> and others.
118 119 120

Documentation
--------------
121
Documentation by Martin Langhoff <[email protected]> and others.
122 123 124

GIT
---
125
Part of the linkgit:git[1] suite