unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: zimoun <zimon.toutoune@gmail.com>
To: Magali <magalilemes00@gmail.com>,
	"Gábor Boskovits" <boskovits@gmail.com>
Cc: Guix Devel <guix-devel@gnu.org>, Mathieu Othacehe <othacehe@gnu.org>
Subject: Re: [outreachy] Walk through the Git history (guix git {authenticate,log})
Date: Wed, 16 Dec 2020 10:35:07 +0100	[thread overview]
Message-ID: <86czzam6us.fsf@gmail.com> (raw)
In-Reply-To: <c333cabd-dbe4-9718-56e8-64e03ee1024d@gmail.com>

Hi Magali,

On Tue, 15 Dec 2020 at 12:20, Magali <magalilemes00@gmail.com> 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 =
> "/home/magali/.cache/guix/checkouts/pjmkglp4t7znuugeurpurzikxq3tnlaywmisyr27shj7apsnalwq"
> scheme@(guix-user)> (let* ((repo (repository-open cache))
>          (latest-commit
>           (commit-lookup repo (reference-target (repository-head repo)))))
>     (let loop ((commit latest-commit)
>                (res (list latest-commit)))
>       (match (commit-parents commit)
>              (() (reverse res))
>              ((head . tail)
>               (loop head (cons head res))))))
> Segmentation fault (core dumped)
> -------

It rings this bell:

   <https://yhetil.org/guix-patches/87v9khjq3y.fsf@gnu.org>

and so maybe this bug: <https://gitlab.com/guile-git/guile-git/-/issues/21>. 

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 match) (srfi srfi-1))
scheme@(guix-user)> (define cache (url-cache-directory (channel-url %default-guix-channel)))
scheme@(guix-user)> (define repo (repository-open cache))
scheme@(guix-user)> (define commits (let* ((latest-commit
                             (commit-lookup repo (reference-target (repository-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 = (#<git-commit b828057ea4c096898da8c9810e7a6607359f2aa3>
 #<git-commit ea50795d7f54582d5c439f60e836ff2ee5d8aed2>
 #<git-commit b7b9ee75885426a6ed27a78f351c6cdd9cf7f952>
 #<git-commit 4c327e025277dd59b864200d5ecf671b5656e7c9>
 #<git-commit a3a81a8703295b6ac2f0ffde5a2e8e72196178bb>)
--8<---------------cut here---------------end--------------->8---

Hope that helps,
simon


  reply	other threads:[~2020-12-16  9:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-11 17:41 [outreachy] Walk through the Git history (guix git {authenticate, log}) zimoun
2020-12-11 19:01 ` [outreachy] Walk through the Git history (guix git {authenticate,log}) Magali
2020-12-12 12:24   ` zimoun
2020-12-12 17:24     ` Magali
2020-12-12 17:49       ` [outreachy] Walk through the Git history zimoun
2020-12-14 10:20         ` Ludovic Courtès
2020-12-15 15:20     ` [outreachy] Walk through the Git history (guix git {authenticate,log}) Magali
2020-12-16  9:35       ` zimoun [this message]
2020-12-18 15:34       ` Ludovic Courtès
2020-12-19  3:18         ` Magali
2020-12-12  8:42 ` Mathieu Othacehe
2020-12-12 12:10   ` zimoun

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=86czzam6us.fsf@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=boskovits@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=magalilemes00@gmail.com \
    --cc=othacehe@gnu.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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).