lkml.org 
[lkml]   [2012]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: Missing tags in my local stable git repo
    From
    Date
    On Mon, 2012-12-10 at 11:30 -0800, Linus Torvalds wrote:

    > Any tree that is an alternate and ever has *any* objects in it that
    > can become unreachable is a really really really bad idea.

    The only alternates that I use are my local copies of stable and your
    tree, which should always be safe.

    > Also, you should never *ever* make an alternate object store be
    > *another* alternate object store, and I think that may be the problem
    > in your case. Iirc git doesn't follow alternates recursively. So what
    > can happen is that you got objects in the "middle" alternate, that
    > then get pruned away by "git gc" (because they exist in the origin
    > repository), but they got pruned away from the furthest alternate in
    > the meantime, and now the objects are "two hops" away, and will not
    > ever be seen.

    OK, this may be my issue, as my stable.git has my copy of your tree as
    an alternate. Maybe I can merge the two trees. Although I'm not exactly
    sure how to. As I have my copies as both alternates as well as remotes
    for my working repos, to get them to pull everything in with a remote
    update. I have in my copy of the stable.git tree the following in the
    config file:

    [remote "stable"]
    url = git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
    fetch = +refs/heads/*:refs/heads/*

    Otherwise I don't get the updates from stable when I do a remote fetch
    of my local copies. Would something like this work?

    [remote "origin"]
    fetch = +refs/*:refs/*
    mirror = true
    url = git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
    [remote "stable"]
    url = git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
    fetch = +refs/heads/*:refs/heads/*

    That is, if I have a single linus-stable.git repo that all my other
    repos use as an alternate and a remote, I could have this repo updated
    with:

    git fetch
    git remote update stable

    and all my other repos will get all the updates from both your tree and
    the stable tree with a single remote update of this copy?

    Am I making any sense? ;-)


    >
    > Moral of the story: be *very* careful when using alternates. Only ever
    > point the alternate file at a *real* repository (not another one with
    > alternates), and only one that never has references removed.

    Note, I can just keep my normal set up, as it looks like the only damage
    that can happen is my copy of stable.git tree getting corrupted (as it
    did), and the fix is simply to blow it away and recreate it. No big
    deal.

    -- Steve




    \
     
     \ /
      Last update: 2012-12-10 22:21    [W:6.397 / U:0.040 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site