From debbugs-submit-bounces@debbugs.gnu.org Sat May 30 06:45:27 2020 Received: (at 41604) by debbugs.gnu.org; 30 May 2020 10:45:27 +0000 Received: from localhost ([127.0.0.1]:56973 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jeyzX-0003fI-2z for submit@debbugs.gnu.org; Sat, 30 May 2020 06:45:27 -0400 Received: from mail-qk1-f179.google.com ([209.85.222.179]:33608) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jeyzU-0003f3-FM for 41604@debbugs.gnu.org; Sat, 30 May 2020 06:45:24 -0400 Received: by mail-qk1-f179.google.com with SMTP id g28so3937082qkl.0 for <41604@debbugs.gnu.org>; Sat, 30 May 2020 03:45:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=057dYgpwHWwqGfp7sHij0Lp5JIA8VoPtmOPmQCeHlwc=; b=oNaGldPOrj5SXblemNVigs/qo7dWji7MIdv7W3BcCEI9BZ6iKrIixXUIM3rR2w0WT4 LPhchHWilw4omyMLQ/PHehatBjgWELUV8BG/tMrhWIsuIJC5jbn9AqAxSRpfAA9ETGrj 4Lzv6hzCw1glH2Nvp6fmUVcKmdBiqM269z25r+jQEP2PgRlcC9f8f5q90w0KSY8xqCkQ vm/RA7kKFqfjZPwFqgb7O+rj+Q4mQTftS3nxqC/rFR5NYwba8dCGIwsBJJ5nCGjLU9BG KvXVFj/euwikhhmJHP+/BwPTXIbBbbP5gw5Q04id0wu2S9lbX1M9MJgzttpC793mGE9i BklA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=057dYgpwHWwqGfp7sHij0Lp5JIA8VoPtmOPmQCeHlwc=; b=fE0Q4NNATl6tNuXqr0dxA7t8p0ZUXXrXXJ9puXNQx0RQ8rJxaJKzoQaPr7jKbPybVF 6glLGw1fEZdWo8t9FeDi0XyaYUxwAwkyigfnjq756ip717026ZWeOdeFDTSz6lgld6jf 1FZMZ5f4NuQtajrfflsNTCkjPepZYdFSGvmph2RnhUmyogbstps9kDrBCpfayPuJDCx9 7k7dvMh6w5smhWzezEqSTtEvbQa3adeqi7Eau6GlHRZ7lRElIp12vjmIPJQPnwMWh0xb KLrKISRBvAQWtjXcSRSDa50HcwsYmbnpy5Rslqa2vsqYmVbvx6PKdaP6xjf12dy+yFqZ vG5A== X-Gm-Message-State: AOAM531aEWYgOtOKXitzLV0yxz1nQ0a5y9se77ZFdio2q4QpYe7PWrEi WkKEaN8rscCJRCd9Pp/Vkrnd2YCH5U+knc3UvVM= X-Google-Smtp-Source: ABdhPJxDB6Y+Pmz9cx52Hc64xdDX5AJ5CuR7zBzyRRl9EHw+G3xAsvTyNXqA15ff0MVX9CXQ6sufI000UMhkYqVSoRg= X-Received: by 2002:ae9:f214:: with SMTP id m20mr11768517qkg.232.1590835518746; Sat, 30 May 2020 03:45:18 -0700 (PDT) MIME-Version: 1.0 References: <87zh9qofw7.fsf@asu.edu> <87r1v2oefd.fsf@asu.edu> <87k10uob2f.fsf@asu.edu> <87ftbinoo7.fsf@asu.edu> In-Reply-To: <87ftbinoo7.fsf@asu.edu> From: zimoun Date: Sat, 30 May 2020 12:45:07 +0200 Message-ID: Subject: Re: bug#41604: guix pull impossible after rebasing a local repository To: John Soo Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 41604 Cc: 41604@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi John, On Sat, 30 May 2020 at 04:26, John Soo wrote: > Yeah guix pull --commit=1444040933 --allow-downgrades failed. Hum? with this message: --8<---------------cut here---------------start------------->8--- guix pull: error: Git error: object not found - no match for id (57518fc7bf1efc899c0dabaa76685a319661f8e4) --8<---------------cut here---------------end--------------->8--- ? > > Hehe! Dangerous zone. :-) > > I think I found that out, haha! To be honest, I have tried to use the checkout ~/.cache/guix/checkout/pjmkglp4t7znuugeurpurzikxq3tnlaywmisyr27shj7apsnalwq as local clone in order to rebase, worktree and apply patches. Bad, really bad idea! The discipline to avoid breakage is too high. ;-) > I guess that makes me wonder what the desired specification is. > There is a lot of problem space to explore. As a user I would want to > be able to take my local patches as "the real truth". > > Because guix has a linear git history, that means the user needs to > always rebase. Often I have patches open for months that I am currently > testing and working on. It would be convenient for me to be able to guix > pull into my default user profile. > > On the other hand, as you point out, using a hash that disappears from > the git history is dangerous. The git history no longer tracks the guix > pull history and then there may exist pulls in history that may never be > recoverable. > > There seems to be some existing support for the rebasing into the > default profile since branches are allowed as references in the channels > configuration. Has the rebase use case been discussed before? Oh, also, > history items can be deleted in other places with --delete-generations > and friends. I am not sure what to classify this problem, bug or > something else. I am not sure to see what is the desired specification. Well, I do not know if my workflow is the good one but let me describe how it is organised. The local (master) checkout is at ~/src/guix/guix/ and then I only checkout the branches using 'worktree' (thanks to Ricardo to show me the tips during a "Skill Share" session on Dec. 2018 :-)). Well, Magit helps a lot here. Basically all my branches live under ~/src/guix/wk/. And when I test patches, I always create a new branch. Well, I do not often rebase enough so I never remember the 'onto' direction so I always read the doc for that. :-) (The price to pay with worktree is that I "compile" all Guix really often because it does not reuse .go files; even if I tried to synchronize the .go files to avoid such annoyance but I have failed.) Just 'guix' refers to the one living at ~/.config/guix/current because I always want that "guix install foo" refers to upstream. Well, I never pull the latest commit from https://git.savannah.gnu.org/git/guix.git because the substitutes are almost never available so I pull 2 weeks behind. Basically, I do: "git -C ~/.cache/guix/pjmkglp4t7znuugeurpurzikxq3tnlaywmisyr27shj7apsnalwq pull" then guix pull --commit=$(git -C ~/.cache/guix/ \ --before=$(date --date='2 weeks ago' +%Y-%m-%d) \ --format="%h" | head -n1) And when I want to install something from one of the branches, it depends: a- inside "guix environment guix" and ~/src/guix/wk/ ./pre-inst-env guix install foo -p /tmp/profile and then I use this /tmp/profile as any other. Or I go with "guix environment". Well, if it is something I want to hold, then I write down the manifest and channel files. b- inside "guix environment guix" and ~/src/guix/wk/ ./pre-inst-env guix pull --branch= --url=$PWD -p ~/tmp/ /tmp//bin/guix blabla and I almost never track "permanently" such other guix. For custom packages, I am more often using '--load-path' than 'channel'. Last, I use more and more "guix time-machine". Well actually more than b-, which I only use to test patches about "guix pull". Roughly speaking, - "guix environment" creates temporary profile - "guix time-machine" create temporary pull And with this new "authentication" of "guix pull", I think now, it would be better to do: guix time-machine --branch= --url=~/src/wk/ -- blabla Well, I do not know if all this is the correct way. But it is more or less what I am doing to avoid annoyance. All the best, simon