all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: zimoun <zimon.toutoune@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>, Magali <magalilemes00@gmail.com>
Cc: Guix Devel <guix-devel@gnu.org>
Subject: Re: [Outreachy] Strategy to implement guix git log --pretty=<string>
Date: Mon, 18 Jan 2021 16:02:51 +0100	[thread overview]
Message-ID: <86a6t69tk4.fsf@gmail.com> (raw)
In-Reply-To: <87y2gv1a3d.fsf@gnu.org>

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	other threads:[~2021-01-18 15:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-06  4:35 [Outreachy] Strategy to implement guix git log --pretty=<string> Magali
2021-01-06  8:03 ` Gábor Boskovits
2021-01-14 21:29 ` Ludovic Courtès
2021-01-18 15:02   ` zimoun [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-01-06  8:10 Leo Prikler
2021-01-18 14:45 ` 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

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

  git send-email \
    --in-reply-to=86a6t69tk4.fsf@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=ludo@gnu.org \
    --cc=magalilemes00@gmail.com \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.