# git cvsexportcommit: error patch does not apply

2 messages from 2012-08-03 to 2012-08-04. Participants: Ilya Basin.
Thread: https://gitlist.dev/t/31178

## Ilya Basin, 2012-08-03 09:05

Subject: git cvsexportcommit: error patch does not apply
Message-ID: <999213645.20120803130555@gmail.com>
URL: https://gitlist.dev/e/999213645.20120803130555%40gmail.com

```
Hi. Here's what I'm trying to do:

In gitcvs:
    [il@basin documentation]$ git mv SIC_SAP1_0_ADM_dv1_1.doc SIC_SAP1_0_ADM_dv1_2.doc
    (edit the file)
    [il@basin documentation]$ git commit ... SIC_SAP1_0_ADM_dv1_2.doc
    ...
    $ git log --stat -n 1
    commit b04fa43c9f1374cf0ea5f9bf88024282414b0a0c
    Date:   Wed Aug 1 12:50:53 2012 +0400
    
        SIC_SAP1_0_ADM_dv1_2.doc: connection_timeout
    
     documentation/SIC_SAP1_0_ADM_dv1_1.doc |  Bin 7383040 -> 0 bytes
     documentation/SIC_SAP1_0_ADM_dv1_2.doc |  Bin 0 -> 7427584 bytes
     2 files changed, 0 insertions(+), 0 deletions(-)

OK So far

    $ git cvsexportcommit -w ../../cvs/SAP -u -p -k -c b04fa43c9f1374cf0ea5f9bf88024282414b0a0c
    Checking if patch will apply
    cvs update: nothing known about `documentation/SIC_SAP1_0_ADM_dv1_2.doc'
    cvs status: nothing known about `documentation/SIC_SAP1_0_ADM_dv1_2.doc'
    Huh? Status 'Unknown' reported for unexpected file 'no file SIC_SAP1_0_ADM_dv1_2.doc'
    Applying
    error: the patch applies to 'documentation/SIC_SAP1_0_ADM_dv1_1.doc' (e0c6cf56bd58ce3b1a8b8e00bfd20f75f89110f7), which does not match the current contents.
    error: documentation/SIC_SAP1_0_ADM_dv1_1.doc: patch does not apply
    cannot patch at /usr/lib/git-core/git-cvsexportcommit line 333.

    $ ls -l ../../cvs/SAP/documentation/SIC_SAP1_0_ADM_dv1_1.doc*
    -rw-r--r-- 1 basin Users 7382325 Aug  3 12:32 ../../cvs/SAP/documentation/SIC_SAP1_0_ADM_dv1_1.doc
    -rw-r--r-- 1 basin Users 7383040 Jun  9  2005 ../../cvs/SAP/documentation/SIC_SAP1_0_ADM_dv1_1.doc.orig

I compared SIC_SAP1_0_ADM_dv1_1.doc.orig and the file from HEAD~1 .
They are equal. Why error?

```

## Ilya Basin, 2012-08-04 09:05

Subject: Re: git cvsexportcommit: error patch does not apply
Message-ID: <1029867674.20120804130505@gmail.com>
URL: https://gitlist.dev/e/1029867674.20120804130505%40gmail.com
In-Reply-To: <999213645.20120803130555@gmail.com>

```
IB>     $ git cvsexportcommit -w ../../cvs/SAP -u -p -k -c b04fa43c9f1374cf0ea5f9bf88024282414b0a0c
IB>     Checking if patch will apply
IB>     cvs update: nothing known about `documentation/SIC_SAP1_0_ADM_dv1_2.doc'
IB>     cvs status: nothing known about `documentation/SIC_SAP1_0_ADM_dv1_2.doc'
IB>     Huh? Status 'Unknown' reported for unexpected file 'no file SIC_SAP1_0_ADM_dv1_2.doc'
IB>     Applying
IB>     error: the patch applies to 'documentation/SIC_SAP1_0_ADM_dv1_1.doc' (e0c6cf56bd58ce3b1a8b8e00bfd20f75f89110f7), which does not match the current contents.
IB>     error: documentation/SIC_SAP1_0_ADM_dv1_1.doc: patch does not apply
IB>     cannot patch at /usr/lib/git-core/git-cvsexportcommit line 333.

Removing '-k' helped. I think it's a bug.
'-k' should not affect binary files.


-- 

```
