git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Rast <trast@student.ethz.ch>
To: Brent Goodrick <bgoodr@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: "warning: no common commits" triggered due to change of remote's IP address?
Date: Sun, 1 Mar 2009 22:20:56 +0100	[thread overview]
Message-ID: <200903012221.03662.trast@student.ethz.ch> (raw)
In-Reply-To: <e38bce640903011001p2d705707o9f7145ab5ab68929@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2099 bytes --]

Brent Goodrick wrote:
> My expectation at this point is that, since I've changed only the IP
> address, and kept everything else the same, git should be smart enough
> to compare SHA1 values only and not download the entire remote repo
> just to do that comparison.
> 
> But I was quite surprised to find that it was pulling down tons of data:

Git doesn't care about the details of the transport; during its
handshake, lists of the available refs are exchanged, and then used to
determine the common commits.  So I'm also rather surprised.

However, your use of + refspecs in

>   gitw fetch 88.99.100.101:git.repos/environ.git
> +refs/heads/home:refs/remotes/origin/home

makes me wonder: have you rewritten the repo hosting 'home' between
two fetches?  Using (especially, but not only) git-filter-branch can
easily render your history disjoint from the pre-filtering state.

>   warning: no common commits

Either your history is very short and really has no common commits
whatsoever, or it gave up because of the 256 revision limit during
find_common().

IIRC it walks by date, so it is enough to make 256 local commits with
a new timestamp to hit that limit.  I posted some experimental code
two months ago that would use a bisection algorithm, so that it is
harder to hit the limit and faster at detecting disjoint history, but
nobody had the time to review it.

I'll follow up with the patch if you want to try it.  The problem is
it's quite large _and_ I don't run any git servers where I could give
it a good testing.  You'll have to apply it to both sides.

(It does have the nice side-effect of saving the uploading side a bit
of work.)

>  1. Will terminating the git fetch like I did leave the satellite repo
>     in an inconsistent state? If so, is my only choice to start
>     a new repo from scratch on the satellite machine, or is there some
>     repair mechanism?

It will just leave a temporary pack file that git-gc will eventually
remove.  You can just try another fetch later.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

  reply	other threads:[~2009-03-01 21:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-01 18:01 "warning: no common commits" triggered due to change of remote's IP address? Brent Goodrick
2009-03-01 21:20 ` Thomas Rast [this message]
2009-03-01 23:01   ` Brent Goodrick
2009-03-02  8:40     ` Thomas Rast
2009-03-02  8:56       ` Thomas Rast
2009-03-02 16:43         ` Brent Goodrick

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=200903012221.03662.trast@student.ethz.ch \
    --to=trast@student.ethz.ch \
    --cc=bgoodr@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).