From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 2I33BvPV2V+qPwAA0tVLHw (envelope-from ) for ; Wed, 16 Dec 2020 09:40:03 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id CNg3AfPV2V+FYwAAbx9fmQ (envelope-from ) for ; Wed, 16 Dec 2020 09:40:03 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 832D794043A for ; Wed, 16 Dec 2020 09:40:02 +0000 (UTC) Received: from localhost ([::1]:33228 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kpTHt-0007wC-8C for larch@yhetil.org; Wed, 16 Dec 2020 04:40:01 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35788) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kpTHe-0007vv-83 for guix-devel@gnu.org; Wed, 16 Dec 2020 04:39:47 -0500 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]:50572) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kpTHc-0008PV-D2; Wed, 16 Dec 2020 04:39:45 -0500 Received: by mail-wm1-x336.google.com with SMTP id 190so1699779wmz.0; Wed, 16 Dec 2020 01:39:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=Ia9q3x3zIfU1ATVOjsSGZjuLtGKnvjVu5o+NWlsqWqo=; b=uMtoxF2iYSBOsoxWFji1OdcO0GgTRkGzJ3QK8V5ylb7fyEIfeujQuTP+DtOsvJ3xBB 7tXL/vcasRHJrLzBmMvuOlRuLmakpHs0LdjQBnutPmAw5ukn3L2CrRpkXt9KRO9sAPvb d9jlrD1boIHGmaGxpdVfOJnpUkgEVxEi5NUja14XTgWoASnO85E+z9kUsyJJhOL05OOf T6lWTThw7cJz2TamitrC+gBLyHwpexqaPkHlx/fdJ0qtxWdZjjw1RkkHuRW0JQRa4NVR 6x+g5rArzI0ly+r+gyyNQCCOH4weo0TcFhuO0SgaikR14Yu5Wf57DqTwWPnpTzJ8GlQ5 F6bA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=Ia9q3x3zIfU1ATVOjsSGZjuLtGKnvjVu5o+NWlsqWqo=; b=WF6s0g8g+BDDiqiMmxMDdeBRP0/11E2ESCqBfzBNBMGdeBxaqR5sQJUQFHp5mPFqkX FMrQXR7BgsUzPnU4rl5ZIVrePF2TRaH79xcVZAyS0oXkPmAHaB2zdLr5cO+xMfmW4CAF wc7hVQifcEWsupDYuT7YI07N9t7AVrlZcA2gaNdM3OOLr55Tdmy7kD7osFpDB22H1iFV elo35/VSurHMDmVZKZzGQPOglJ5lFiNY9DwxvsJdo+O7H9T9N0SocGkYEnCdDKClAcqY 2FT+H3Au5XuTg+GkcCPgOu6s1i+fu56PiTDm5so2Sxq5TdDDJXLzGlwIEdMon7ARplSi RLtg== X-Gm-Message-State: AOAM531gXmQgpcDmB3QFeW+1ZYwVKT2iYuNteY/wvkWaQQItgOaOOeNI XFbKvxe2ykohgY+HaLf/BBd/CVOfIgE= X-Google-Smtp-Source: ABdhPJwG4MywEUIILaCPLBU9g6fFR9IFPi0SP+zCNGlNuoIh/zMagN154RL1cVGKS+MCLiOBPIo0SA== X-Received: by 2002:a7b:ce0f:: with SMTP id m15mr2423574wmc.56.1608111581619; Wed, 16 Dec 2020 01:39:41 -0800 (PST) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id u26sm1935085wmm.24.2020.12.16.01.39.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Dec 2020 01:39:40 -0800 (PST) From: zimoun To: Magali , =?utf-8?Q?G=C3=A1bor?= Boskovits Subject: Re: [outreachy] Walk through the Git history (guix git {authenticate,log}) In-Reply-To: References: <86r1nwfdeu.fsf@gmail.com> <86lfe3fc0t.fsf@gmail.com> Date: Wed, 16 Dec 2020 10:35:07 +0100 Message-ID: <86czzam6us.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=zimon.toutoune@gmail.com; helo=mail-wm1-x336.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Guix Devel , Mathieu Othacehe Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -1.21 Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=gmail.com header.s=20161025 header.b=uMtoxF2i; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: 832D794043A X-Spam-Score: -1.21 X-Migadu-Scanner: scn0.migadu.com X-TUID: ODGSmAcmWnDN Hi Magali, On Tue, 15 Dec 2020 at 12:20, Magali wrote: > scheme@(guix-user)> ,use(guix git) > scheme@(guix-user)> ,use(git) > scheme@(guix-user)> ,use(guix channels) > scheme@(guix-user)> ,use(ice-9 match) > scheme@(guix-user)> (define cache (url-cache-directory (channel-url > %default-guix-channel))) > scheme@(guix-user)> cache > $1 =3D > "/home/magali/.cache/guix/checkouts/pjmkglp4t7znuugeurpurzikxq3tnlaywmisy= r27shj7apsnalwq" > scheme@(guix-user)> (let* ((repo (repository-open cache)) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (latest-commit > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (commit-lookup rep= o (reference-target (repository-head repo))))) > =C2=A0=C2=A0=C2=A0 (let loop ((commit latest-commit) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 (res (list latest-commit))) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (match (commit-parents commit) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = (() (reverse res)) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = ((head . tail) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 (loop head (cons head res)))))) > Segmentation fault (core dumped) > ------- It rings this bell: and so maybe this bug: = .=20 Mathieu, Ludo or any other Guile-Git masters, WDYT? Therefore, let open the repo outside: --8<---------------cut here---------------start------------->8--- scheme@(guix-user)> (use-modules (guix git) (git) (guix channels) (ice-9 ma= tch) (srfi srfi-1)) scheme@(guix-user)> (define cache (url-cache-directory (channel-url %defaul= t-guix-channel))) scheme@(guix-user)> (define repo (repository-open cache)) scheme@(guix-user)> (define commits (let* ((latest-commit (commit-lookup repo (reference-target (reposit= ory-head repo))))) (let loop ((commit latest-commit) (res (list latest-commit))) (match (commit-parents commit) (() (reverse res)) ((head . tail) (loop head (cons head res))))))) scheme@(guix-user)> ,pp (take commits 5) $1 =3D (# # # # #) --8<---------------cut here---------------end--------------->8--- Hope that helps, simon