# [PATCH] New files in git weren't being downloaded during CVS update

4 messages from 2007-01-19 to 2007-01-20. Participants: Andy Parkins, Simon 'corecode' Schubert.
Thread: https://gitlist.dev/t/6443

## Andy Parkins, 2007-01-19 10:49

Subject: [PATCH] New files in git weren't being downloaded during CVS update
Message-ID: <200701191049.40833.andyparkins@gmail.com>
URL: https://gitlist.dev/e/200701191049.40833.andyparkins%40gmail.com

```
If a repository was checked out via git-cvsserver and then later a new
file is added to the git repository via some other method; a CVS update
wasn't fetching the new file.

It would be reported as a new file as
 A some/dir/newfile.c
but would never appear in the directory.

The problem (I think) is that when git-cvsserver detected a new file, it
was issuing the new file message then skipping the actual file send part
and moving to the next file its list.  In fact only an updated file
would be transmitted.

The fix is to simply remove the "next" that was skipping the file
transmit; which is what this patch does.

Signed-off-by: Andy Parkins <andyparkins@gmail.com>
---
I don't understand enough about the CVS protocol to know whether this really
is the right fix.  It certainly addresses my problem, but I assume that the "next"
was put in there for a reason.

 git-cvsserver.perl |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index a33a876..c370a53 100755
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
@@ -882,7 +882,6 @@ sub req_update
 		print "MT text A \n";
                 print "MT fname $filename\n";
                 print "MT newline\n";
-		next;
 
 	    }
 	    else {
-- 
1.5.0.rc1.gf4b6c

```

## Simon 'corecode' Schubert, 2007-01-20 01:19

Subject: Re: [PATCH] New files in git weren't being downloaded during CVS update
Message-ID: <45B16E29.7000607@fs.ei.tum.de>
URL: https://gitlist.dev/e/45B16E29.7000607%40fs.ei.tum.de
In-Reply-To: <200701191049.40833.andyparkins@gmail.com>

```
Andy Parkins wrote:
> diff --git a/git-cvsserver.perl b/git-cvsserver.perl
> index a33a876..c370a53 100755
> --- a/git-cvsserver.perl
> +++ b/git-cvsserver.perl
> @@ -882,7 +882,6 @@ sub req_update
>  		print "MT text A \n";
>                  print "MT fname $filename\n";
>                  print "MT newline\n";
> -		next;

I think this is the wrong fix.  Reading cvs's classify.c, T_ADDED is only generated for *locally* added files, never for added files in the repo.  The correct status would be "U" as well.

cheers
  simon

-- 
Serve - BSD     +++  RENT this banner advert  +++    ASCII Ribbon   /"\
Work - Mac      +++  space for low €€€ NOW!1  +++      Campaign     \ /
Party Enjoy Relax   |   http://dragonflybsd.org      Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz       Mail + News   / \


```

## Andy Parkins, 2007-01-20 10:25

Subject: Re: [PATCH] New files in git weren't being downloaded during CVS update
Message-ID: <200701201025.31251.andyparkins@gmail.com>
URL: https://gitlist.dev/e/200701201025.31251.andyparkins%40gmail.com
In-Reply-To: <45B16E29.7000607@fs.ei.tum.de>

```
On Saturday 2007, January 20 01:19, Simon 'corecode' Schubert wrote:

> I think this is the wrong fix.  Reading cvs's classify.c, T_ADDED is
> only generated for *locally* added files, never for added files in
> the repo.  The correct status would be "U" as well.

I'm sure you're right; I don't know enough about CVS to comment.  The 
real fix would seem to be to completely remove the special case for 
added files and let it drop through to the normal update code. 

However, I'm not confident about that either.



Andy

-- 
Dr Andrew Parkins, M Eng (Hons), AMIEE
andyparkins@gmail.com

```

## Simon 'corecode' Schubert, 2007-01-20 10:41

Subject: Re: [PATCH] New files in git weren't being downloaded during CVS update
Message-ID: <45B1F1D9.7090903@fs.ei.tum.de>
URL: https://gitlist.dev/e/45B1F1D9.7090903%40fs.ei.tum.de
In-Reply-To: <200701201025.31251.andyparkins@gmail.com>

```
Andy Parkins wrote:
> On Saturday 2007, January 20 01:19, Simon 'corecode' Schubert wrote:
> 
>> I think this is the wrong fix.  Reading cvs's classify.c, T_ADDED is
>> only generated for *locally* added files, never for added files in
>> the repo.  The correct status would be "U" as well.
> 
> I'm sure you're right; I don't know enough about CVS to comment.  The 
> real fix would seem to be to completely remove the special case for 
> added files and let it drop through to the normal update code. 

yes, that's what I ment.

cheers
  simon

-- 
Serve - BSD     +++  RENT this banner advert  +++    ASCII Ribbon   /"\
Work - Mac      +++  space for low €€€ NOW!1  +++      Campaign     \ /
Party Enjoy Relax   |   http://dragonflybsd.org      Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz       Mail + News   / \


```
