All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Parkins <andyparkins@gmail.com>
To: git@vger.kernel.org
Subject: Re: [PATCH] New files in git weren't being downloaded during CVS update
Date: Mon, 22 Jan 2007 10:44:47 +0000	[thread overview]
Message-ID: <200701221044.49467.andyparkins@gmail.com> (raw)
In-Reply-To: <200701211425.12971.andyparkins@gmail.com>

On Sunday 2007 January 21 14:25, Andy Parkins wrote:

> This is in response to Simon Schubert's suggestion that T_ADDED is an
> inappropriate category for a remotely added file.  Instead this treats
> remotely added files the same as remotely changed files.

I'm still concerned that this fix is not right.  Having thought more about it, 
I suspect that this breaks the other "added-file" case, where the file is 
added locally but not remotely.

There are three key cases:
 1. File present locally and remotely.  Modified remotely.  Response "U"
 2. File present locally only.  Response should be "A"
 3. File present remotely only.  Response should be "U"

I think the real problem is that both 2 and 3 are being handled in the same 
place.  Hence, my patch, which has fixed case 3; will have broken case 2.

I need a bit of confirmation from Martin; but I suspect that the correct fix 
is something like this:

    elsif ( (!defined($wrev) || $wrev == 0) && !defined($meta->{revision})
    {
        $log->info("Tell the client the file will be added");

If I'm correct, this would only run the added section when there is no 
matching revision in the repository - this would be case 2.  Then case 3 
would be handled as the else to this if, which handles every other case.

My testing of this works, but I'd like confirmation that I'm right in this 
thinking?  Patch to follow...


Andy
-- 
Dr Andy Parkins, M Eng (hons), MIEE
andyparkins@gmail.com

  parent reply	other threads:[~2007-01-22 10:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-21 14:25 [PATCH] New files in git weren't being downloaded during CVS update Andy Parkins
2007-01-22  2:35 ` Junio C Hamano
2007-01-22  7:02   ` Martin Langhoff
2007-01-22  7:16     ` Junio C Hamano
2007-01-22 10:44 ` Andy Parkins [this message]
2007-01-22 10:46   ` Andy Parkins
2007-01-22 10:56   ` Andy Parkins
2007-01-22 11:08     ` Simon 'corecode' Schubert
  -- strict thread matches above, loose matches on Subject: below --
2007-01-19 10:49 Andy Parkins
2007-01-20  1:19 ` Simon 'corecode' Schubert
2007-01-20 10:25   ` Andy Parkins
2007-01-20 10:41     ` Simon 'corecode' Schubert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200701221044.49467.andyparkins@gmail.com \
    --to=andyparkins@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.