<div id="Committing-your-changes"></div>
<div class="header">
<p>
Next: [[cvs: Cleaning up#Cleaning up|Cleaning up]], Previous: [[cvs: Getting the source#Getting the source|Getting the source]], Up: [[cvs: A sample session#A sample session|A sample session]] &nbsp; |[[cvs: Index#SEC_Contents|Contents]]||[[cvs: Index#Index|Index]]|</p>
</div>

----

<div id="Committing-your-changes-1"></div>
==== Committing your changes ====
<div id="index-Committing-changes-to-files"></div>
<div id="index-Log-message-entry"></div>

When you have checked that the compiler is still compilable you decide
to make a new version of &lsquo;<tt>backend.c</tt>&rsquo;.  This will
store your new &lsquo;<tt>backend.c</tt>&rsquo; in the repository and
make it available to anyone else who is using that same
repository.

<div class="example" style="margin-left: 3.2em">
 $ cvs commit backend.c
</div>

<small>CVS</small> starts an editor, to allow you to enter a log
message.  You type in &ldquo;Added an optimization pass.&rdquo;,
save the temporary file, and exit the editor.

<div id="index-CVSEDITOR_002c-environment-variable"></div>
<div id="index-EDITOR_002c-environment-variable"></div>
The environment variable <code>$CVSEDITOR</code> determines
which editor is started.  If <code>$CVSEDITOR</code> is not
set, then if the environment variable <code>$EDITOR</code> is
set, it will be used. If both <code>$CVSEDITOR</code> and
<code>$EDITOR</code> are not set then there is a default
which will vary with your operating system, for example
<code>vi</code> for unix or <code>notepad</code> for Windows
NT/95.

<div id="index-VISUAL_002c-environment-variable"></div>
In addition, <small>CVS</small> checks the <code>$VISUAL</code> environment
variable.  Opinions vary on whether this behavior is desirable and
whether future releases of <small>CVS</small> should check <code>$VISUAL</code> or
ignore it.  You will be OK either way if you make sure that
<code>$VISUAL</code> is either unset or set to the same thing as
<code>$EDITOR</code>.

When <small>CVS</small> starts the editor, it includes a list of
files which are modified.  For the <small>CVS</small> client,
this list is based on comparing the modification time
of the file against the modification time that the file
had when it was last gotten or updated.  Therefore, if
a file&rsquo;s modification time has changed but its contents
have not, it will show up as modified.  The simplest
way to handle this is simply not to worry about it&mdash;if
you proceed with the commit <small>CVS</small> will detect that
the contents are not modified and treat it as an
unmodified file.  The next <code>update</code> will clue
<small>CVS</small> in to the fact that the file is unmodified,
and it will reset its stored timestamp so that the file
will not show up in future editor sessions.

If you want to avoid
starting an editor you can specify the log message on
the command line using the &lsquo;<code>-m</code>&rsquo; flag instead, like
this:

<div class="example" style="margin-left: 3.2em">
 $ cvs commit -m &quot;Added an optimization pass&quot; backend.c
</div>


----

<div class="header">
<p>
Next: [[cvs: Cleaning up#Cleaning up|Cleaning up]], Previous: [[cvs: Getting the source#Getting the source|Getting the source]], Up: [[cvs: A sample session#A sample session|A sample session]] &nbsp; |[[cvs: Index#SEC_Contents|Contents]]||[[cvs: Index#Index|Index]]|</p>
</div>
This document was generated on <i>a sunny day</i> using [http://www.nongnu.org/texi2html/ <i>texi2html</i>].
