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>
Cc: 42225@debbugs.gnu.org
Subject: [bug#42225] [PATCH 0/5] Add 'guix git-authenticate' command
Date: Mon, 6 Jul 2020 15:27:26 +0200	[thread overview]
Message-ID: <CAJ3okZ1PXeG96Ws+1azxi_K96+n2XsOtaxecRwhYt4igrg9cXQ@mail.gmail.com> (raw)
In-Reply-To: <871rloke0d.fsf@gnu.org>

On Mon, 6 Jul 2020 at 14:46, Ludovic Courtès <ludo@gnu.org> wrote:

> >    git -C $SRC log | grep Update
> >
> > And I would like to be able to simply run;
> >
> >    guix git log | grep Update
>
> Good point.  Though hopefully this particular use case (finding new
> package updates) is well served by ‘guix pull --news’, no?

It is not for new package updates, but the contrary. :-)
I use it for searching versions back in time.  Which commit introduces
which version.

To be honest, I am almost never use "guix pull --news" because I am
pulling once every full moon, and even when I do, I run an ugly script
like:

--8<---------------cut here---------------start------------->8---
#!/bin/bash

# url-cache-directory from guix/git.scm
# pjmkgl... = hash("https://git.savannah.gnu.org/git/guix.git")
CACHE=~/.cache/guix/checkouts
CHECKOUT=${CACHE}/pjmkglp4t7znuugeurpurzikxq3tnlaywmisyr27shj7apsnalwq

printf "Updating local checkout:\n'$CHECKOUT'..."
git -C $CHECKOUT pull -q
echo " done."

guix pull --commit=$(git -C $CHECKOUT                                    \
                         log                                             \
                         --before=$(date --date='2 weeks ago' +%Y-%m-%d) \
                         --format="%h" | head -n1)                       \
     $@
--8<---------------cut here---------------end--------------->8---

because I do want the substitutes available.  Well, for example, I
run: "guix pull --news" and I get 15 new packages and 367 packages
upgraded.

> It’s not entirely clear to me what a ‘guix git log’ command would do in
> fact: show the log for the ‘guix’ channel?  For all channels (how?)?
> For the specified channel?  For what commit range?

This is maybe out of the current bug report.  I do not know if it is
good to discuss here.  Well, quickly we could imagine:

  guix git log # for guix channel
  guix git log --channel=name

Then for the commit range, it could be the same UI as "git log".
Since the commit messages are well-formatted, it is pretty easy to grep in.

Moreover, "git worktree" could be added too.  Well, the idea behind is
to avoid clone+guix-environment+./pre-env-inst.

> > And the same for tagging commits.  Which implies also improve what "guix
> > pull" and "guix time-machine" accept.
>
> Tagging commits is tricky because users only have a *cached* checkout.
> So if we want persistent tags, we’ll have to develop a separate
> mechanism.  Could be useful, though perhaps redundant with the
> (unimplemented) idea of tagging generation?

Well, I do not want persistent tags.  I am fine with local tags.  I
mean it is easy to tag my local repo with something meaningful for me
and then lookup couple of weeks later.  I do with "git -C $SRC" but I
would like nicer to be able to run:

   guix git log | grep bazinga
   guix git tag foo
   guix time-machine --commit=foo --

> In the short term, we don’t need to solve all these problems: we can
> also go for ‘git-authenticate’ and rename it once we have these other
> commands.

I have learnt that renaming will not work. :-)
Because backward compatibilities and break the workflow of someone.
So I would take the other route, go for "guix git authenticate" and
hoping that other commands would come soon.
Well, I do not know. It is just a suggestion reading your message. :-)

Cheers,
simon




  reply	other threads:[~2020-07-06 13:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-06  8:37 [bug#42225] [PATCH 0/5] Add 'guix git-authenticate' command Ludovic Courtès
2020-07-06  8:43 ` [bug#42225] [PATCH 1/5] git-authenticate: Factorize 'authenticate-repository' Ludovic Courtès
2020-07-06  8:43   ` [bug#42225] [PATCH 2/5] Add 'etc/historical-authorizations' Ludovic Courtès
2020-07-06  8:43   ` [bug#42225] [PATCH 3/5] git: Add 'with-git-error-handling' Ludovic Courtès
2020-07-06  8:43   ` [bug#42225] [PATCH 4/5] Add 'guix git-authenticate' Ludovic Courtès
2020-07-06  8:43   ` [bug#42225] [PATCH 5/5] maint: Remove 'build-aux/git-authenticate.scm' Ludovic Courtès
2020-07-06  9:24 ` [bug#42225] [PATCH 0/5] Add 'guix git-authenticate' command zimoun
2020-07-06 12:46   ` Ludovic Courtès
2020-07-06 13:27     ` zimoun [this message]
2020-07-06 19:48       ` Ludovic Courtès
2020-07-06 21:27         ` zimoun
2020-07-11 11:01           ` bug#42225: " Ludovic Courtès
2020-07-16  0:12             ` [bug#42225] " 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=CAJ3okZ1PXeG96Ws+1azxi_K96+n2XsOtaxecRwhYt4igrg9cXQ@mail.gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=42225@debbugs.gnu.org \
    --cc=ludo@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 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.