summaryrefslogtreecommitdiffstats
path: root/man1/git-cvsexportcommit.1
blob: 2490e8e3e6c9e07629d4dd61cf2df019c4c48299 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
'\" t
.\"     Title: git-cvsexportcommit
.\"    Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
.\"      Date: 2024-04-12
.\"    Manual: Git Manual
.\"    Source: Git 2.44.0.591.g8f7582d995
.\"  Language: English
.\"
.TH "GIT\-CVSEXPORTCOMMIT" "1" "2024\-04\-12" "Git 2\&.44\&.0\&.591\&.g8f7582" "Git Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
git-cvsexportcommit \- Export a single commit to a CVS checkout
.SH "SYNOPSIS"
.sp
.nf
\fIgit cvsexportcommit\fR [\-h] [\-u] [\-v] [\-c] [\-P] [\-p] [\-a] [\-d <cvsroot>]
        [\-w <cvs\-workdir>] [\-W] [\-f] [\-m <msgprefix>] [<parent\-commit>] <commit\-id>
.fi
.sp
.SH "DESCRIPTION"
.sp
Exports a commit from Git to a CVS checkout, making it easier to merge patches from a Git repository into a CVS repository\&.
.sp
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\&.
.sp
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 by default\&.
.sp
Supports file additions, removals, and commits that affect binary files\&.
.sp
If the commit is a merge commit, you must tell \fIgit cvsexportcommit\fR what parent the changeset should be done against\&.
.SH "OPTIONS"
.PP
\-c
.RS 4
Commit automatically if the patch applied cleanly\&. It will not commit if any hunks fail to apply or there were other problems\&.
.RE
.PP
\-p
.RS 4
Be pedantic (paranoid) when applying patches\&. Invokes patch with \-\-fuzz=0
.RE
.PP
\-a
.RS 4
Add authorship information\&. Adds Author line, and Committer (if different from Author) to the message\&.
.RE
.PP
\-d
.RS 4
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\&.
.RE
.PP
\-f
.RS 4
Force the merge even if the files are not up to date\&.
.RE
.PP
\-P
.RS 4
Force the parent commit, even if it is not a direct parent\&.
.RE
.PP
\-m
.RS 4
Prepend the commit message with the provided prefix\&. Useful for patch series and the like\&.
.RE
.PP
\-u
.RS 4
Update affected files from CVS repository before attempting export\&.
.RE
.PP
\-k
.RS 4
Reverse CVS keyword expansion (e\&.g\&. $Revision: 1\&.2\&.3\&.4$ becomes $Revision$) in working CVS checkout before applying patch\&.
.RE
.PP
\-w
.RS 4
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 current directory is within a Git repository\&. The default is the value of
\fIcvsexportcommit\&.cvsdir\fR\&.
.RE
.PP
\-W
.RS 4
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\&.
.RE
.PP
\-v
.RS 4
Verbose\&.
.RE
.SH "CONFIGURATION"
.PP
cvsexportcommit\&.cvsdir
.RS 4
The default location of the CVS checkout to use for the export\&.
.RE
.SH "EXAMPLES"
.PP
Merge one patch into CVS
.RS 4
.sp
.if n \{\
.RS 4
.\}
.nf
$ export GIT_DIR=~/project/\&.git
$ cd ~/project_cvs_checkout
$ git cvsexportcommit \-v <commit\-sha1>
$ cvs commit \-F \&.msg <files>
.fi
.if n \{\
.RE
.\}
.sp
.RE
.PP
Merge one patch into CVS (\-c and \-w options)\&. The working directory is within the Git Repo
.RS 4
.sp
.if n \{\
.RS 4
.\}
.nf
        $ git cvsexportcommit \-v \-c \-w ~/project_cvs_checkout <commit\-sha1>
.fi
.if n \{\
.RE
.\}
.sp
.RE
.PP
Merge pending patches into CVS automatically \(em only if you really know what you are doing
.RS 4
.sp
.if n \{\
.RS 4
.\}
.nf
$ export GIT_DIR=~/project/\&.git
$ cd ~/project_cvs_checkout
$ git cherry cvshead myhead | sed \-n \*(Aqs/^+ //p\*(Aq | xargs \-l1 git cvsexportcommit \-c \-p \-v
.fi
.if n \{\
.RE
.\}
.sp
.RE
.SH "GIT"
.sp
Part of the \fBgit\fR(1) suite