Re: [outreachy] Walk through the Git history (guix git {authenticate,log})

2020-12-18 Thread Magali
Hi! On 18/12/2020 12:34, Ludovic Courtès wrote: > Hi Magali, > > Magali skribis: > >> scheme@(guix-user)> (let* ((repo (repository-open cache)) >> (latest-commit >>   (commit-lookup repo (reference-target (repository-head repo) >>     (let loop ((commit latest-commit) >>

Re: [outreachy] Walk through the Git history (guix git {authenticate,log})

2020-12-18 Thread Ludovic Courtès
Hi Magali, Magali skribis: > 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 (commi

Re: [outreachy] Walk through the Git history (guix git {authenticate,log})

2020-12-16 Thread zimoun
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-chan

Re: [outreachy] Walk through the Git history (guix git {authenticate,log})

2020-12-15 Thread Magali
Hello, I've been tweaking this piece of code below, trying to adapt it so that it could get the latest commit into the commit list too, but I haven't had success. On 12/12/2020 09:24, zimoun wrote: > --8<---cut here---start->8--- > $ guix repl > GNU Guile 3.0.4

Re: [outreachy] Walk through the Git history (guix git {authenticate,log})

2020-12-12 Thread zimoun
Hi Mathieu, On Sat, 12 Dec 2020 at 09:42, Mathieu Othacehe wrote: >> 1. Loop with commit-parents as it is done for ’commit-closure’ in >> guix/git.scm. >> >> 2. Bind git_revwalk_* and use it instead. >> >> WDYT? >> >> Well, #1 is more straightforward but less efficient, IIUC. > > Running s

Re: [outreachy] Walk through the Git history (guix git {authenticate,log})

2020-12-12 Thread zimoun
Hi Magali, On Fri, 11 Dec 2020 at 16:01, Magali wrote: > I think #2 is the way to go. It may be more difficult to implement right > now, but in the future it'll make things easier if we think about adding > an option that allows us to choose the order the commits will be shown, > for instance.

Re: [outreachy] Walk through the Git history (guix git {authenticate,log})

2020-12-12 Thread Mathieu Othacehe
Hello zimoun, > 1. Loop with commit-parents as it is done for ’commit-closure’ in > guix/git.scm. > > 2. Bind git_revwalk_* and use it instead. > > WDYT? > > Well, #1 is more straightforward but less efficient, IIUC. Running something like: --8<---cut here---start

Re: [outreachy] Walk through the Git history (guix git {authenticate,log})

2020-12-11 Thread Magali
Hi, On 11/12/2020 14:41, zimoun wrote: > Hi, > > Discussing how to walk through the Git history > ~/.cache/guix/checkouts/, there is 2 ways to do: > > 1. Loop with commit-parents as it is done for ’commit-closure’ in > guix/git.scm. > > 2. Bind git_revwalk_* and use it instead. > > WDYT? > >

[outreachy] Walk through the Git history (guix git {authenticate, log})

2020-12-11 Thread zimoun
Hi, Discussing how to walk through the Git history ~/.cache/guix/checkouts/, there is 2 ways to do: 1. Loop with commit-parents as it is done for ’commit-closure’ in guix/git.scm. 2. Bind git_revwalk_* and use it instead. WDYT? Well, #1 is more straightforward but less efficient, IIUC.