guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Outreachy] Strategy to implement guix git log --pretty=<string>


From: zimoun
Subject: Re: [Outreachy] Strategy to implement guix git log --pretty=<string>
Date: Mon, 18 Jan 2021 16:02:51 +0100

Hi Ludo,

On Thu, 14 Jan 2021 at 22:29, Ludovic Courtès <ludo@gnu.org> wrote:

> I was going to suggest postponing this feature, but I see in the repo
> you already came up with a reasonable solution (maybe not fool-proof,
> because it should be possible to escape the percent character, and then
> you can’t just use regexps, but it’s probably good enough.)

Yeah, my initial idea was to use PEG.  But the documentation is not easy
to grasp so using regular expressions seems enough to underline the
functionality, with the option to improve later.

Well, the reasonable goal for the project is to run something as:

  ./pre-inst-env guix git log --grep=<term> --pretty=“%h %s”


What is not clear for now:

 - walk the history tree; currently done with something similar to
   ’commit-closure’ and I do not know if all the branches at merge
   points are correctly walked;
 - lazy walk, for example: “git log --oneline | head -n10” does not need to
   traverse all the history tree but only the first 10 commits.
   Something like “co-routine“ (not sure if it is the correct word).  It
   is not a big deal for now because it is fast enough; but far to be
   optimal. ;-)

And these start being an issue with a couple channels.

Cheers,
simon





reply via email to

[Prev in Thread] Current Thread [Next in Thread]