A new request with request id 9016 has been created by koha-devel-request@lists.koha-community.org. Short info on the request is :

Title : Koha-devel Digest, Vol 199, Issue 14
Category :
Description :
Send Koha-devel mailing list submissions to
    koha-devel@lists.koha-community.org

To subscribe or unsubscribe via the World Wide Web, visit
    https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
or, via email, send a message with subject or body 'help' to
    koha-devel-request@lists.koha-community.org

You can reach the person managing the list at
    koha-devel-owner@lists.koha-community.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Koha-devel digest..."


Today's Topics:

1. Replace git-filter-branch with git-filter-repo (Jonathan Druart)
2. Re: Replace git-filter-branch with git-filter-repo
(Julian Maurice)


----------------------------------------------------------------------

Message: 1
Date: Thu, 16 Jun 2022 09:26:23 +0200
From: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
To: koha-devel <koha-devel@lists.koha-community.org>
Subject: [Koha-devel] Replace git-filter-branch with git-filter-repo
Message-ID:
    <CAJzKNY5Ad10DQBygqDhgbM4YLgAm8zwY5cs4rSvq9+xGTft-Ow@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"

Hi devs,

[I sent this on Aug 26th 2021 but it never reached the list!]

You may have seen the following warning when signing off on patches
using the git alias

"""
WARNING: git-filter-branch has a glut of gotchas generating mangled
history
rewrites. Hit Ctrl-C before proceeding to abort, then use an
alternative filtering tool such as 'git filter-repo'
(https://github.com/newren/git-filter-repo/) instead. See
the
filter-branch manual page for more details; to squelch this
warning,
set FILTER_BRANCH_SQUELCH_WARNING=1.
Proceeding with filter-branch...
"""

And yes, it's very slow, `time git so 1` takes around 10 sec for me.

You can switch to git-filter-repo (https://github.com/newren/git-filter-repo).

First, install it (`pip3 install git-filter-repo` should do it,
otherwise read their install doc
https://github.com/newren/git-filter-repo/blob/main/INSTALL.md).

Then adjust the git alias (~/.gitconfig):

so = "!f() { c=`expr $1 - 1`; git filter-repo --message-callback
'return message + b\"\\nSigned-off-by: Full Name <email>\"' --refs
HEAD~$c^..; }; f"

I am using 'so' but you may use something else as it's not what is on the wiki.
"Completely finished after 0.20 seconds."

Cheers,
Jonathan


------------------------------

Message: 2
Date: Thu, 16 Jun 2022 10:00:12 +0200
From: Julian Maurice <julian.maurice@biblibre.com>
To: koha-devel@lists.koha-community.org
Subject: Re: [Koha-devel] Replace git-filter-branch with
    git-filter-repo
Message-ID: <9d645755-9306-2cf2-59de-a2037b21450d@biblibre.com>
Content-Type: text/plain; charset=UTF-8; format=flowed

Hi,

Just to add another way of doing it without installing a new tool:

I use `git rebase -x "git signoff" HEAD~<N>`
signoff is an alias to 'commit --amend -s --no-edit'

I didn't time it, but it always takes less than a second

So, to have the same 'so' alias:

so = "!f() { git rebase -x 'git commit --amend -s --no-edit' HEAD~$1; };f"

One of the benefit of this method is that you can re-run the same
command twice, it will add the signoff line only once.

Le 16/06/2022 à 09:26, Jonathan Druart a écrit :
> Hi devs,
>
> [I sent this on Aug 26th 2021 but it never reached the list!]
>
> You may have seen the following warning when signing off on patches
> using the git alias
>
> """
> WARNING: git-filter-branch has a glut of gotchas generating mangled
> history
> rewrites. Hit Ctrl-C before proceeding to abort, then use an
> alternative filtering tool such as 'git filter-repo'
> (https://github.com/newren/git-filter-repo/) instead. See
> the
> filter-branch manual page for more details; to squelch this
> warning,
> set FILTER_BRANCH_SQUELCH_WARNING=1.
> Proceeding with filter-branch...
> """
>
> And yes, it's very slow, `time git so 1` takes around 10 sec for me.
>
> You can switch to git-filter-repo (https://github.com/newren/git-filter-repo).
>
> First, install it (`pip3 install git-filter-repo` should do it,
> otherwise read their install doc
> https://github.com/newren/git-filter-repo/blob/main/INSTALL.md).
>
> Then adjust the git alias (~/.gitconfig):
>
> so = "!f() { c=`expr $1 - 1`; git filter-repo --message-callback
> 'return message + b\"\\nSigned-off-by: Full Name <email>\"' --refs
> HEAD~$c^..; }; f"
>
> I am using 'so' but you may use something else as it's not what is on the wiki.
> "Completely finished after 0.20 seconds."
>
> Cheers,
> Jonathan
> _______________________________________________
> Koha-devel mailing list
> Koha-devel@lists.koha-community.org
> https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
> website : https://www.koha-community.org/
> git : https://git.koha-community.org/
> bugs : https://bugs.koha-community.org/

--
Julian Maurice
BibLibre


------------------------------

Subject: Digest Footer

_______________________________________________
Koha-devel mailing list
Koha-devel@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : https://www.koha-community.org/
git : https://git.koha-community.org/
bugs : https://bugs.koha-community.org/


------------------------------

End of Koha-devel Digest, Vol 199, Issue 14
*******************************************


NOTE: You are receiving this mail because, the Requester/Technician wanted you to get notified on this request creation.