[Bug 39096] New: Add "tidy all" commits to a git blame ignore file
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39096 Bug ID: 39096 Summary: Add "tidy all" commits to a git blame ignore file Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: jonathan.druart@gmail.com QA Contact: testopia@bugs.koha-community.org Depends on: 38664 To get a relevant blame we want to exclude some commits from bug 38664. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38664 [Bug 38664] Tidy the whole codebase -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39096 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39096 --- Comment #1 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 177739 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=177739&action=edit Bug 39096: Add 'tidy all' commits to a git blame ignore file To get a relevant blame we want to exclude some commits from bug 38664. Test plan: 0. Do not apply this patch 1. % git blame C4/Auth.pm (or other file) Notice that there is a lot of reference to bug 38664 (you can see it with the author "Koha Development Team") 2. Apply this patch 3. Tell git to use this new file: % git config blame.ignoreRevsFile .git-blame-ignore-revs Repeat 1. => There are way less refs to "Koha Development Team" Before: % git blame C4/Auth.pm|grep "Koha Development Team" | wc -l 454 After: % git blame C4/Auth.pm|grep "Koha Development Team" | wc -l 29 QA: Do we add the `git config` command that to ktd so devs won't need to do it? -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39096 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |schodkowy.omegi-0r@icloud.c | |om -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39096 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |jonathan.druart@gmail.com |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39096 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39096 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #177739|0 |1 is obsolete| | --- Comment #2 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 178027 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=178027&action=edit Bug 39096: Add 'tidy all' commits to a git blame ignore file To get a relevant blame we want to exclude some commits from bug 38664. Test plan: 0. Do not apply this patch 1. % git blame C4/Auth.pm (or other file) Notice that there is a lot of reference to bug 38664 (you can see it with the author "Koha Development Team") 2. Apply this patch 3. Tell git to use this new file: % git config blame.ignoreRevsFile .git-blame-ignore-revs Repeat 1. => There are way less refs to "Koha Development Team" Before: % git blame C4/Auth.pm|grep "Koha Development Team" | wc -l 454 After: % git blame C4/Auth.pm|grep "Koha Development Team" | wc -l 29 Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39096 --- Comment #3 from Owen Leonard <oleonard@myacpl.org> --- (In reply to Jonathan Druart from comment #1)
Created attachment 177739 [details] [review] QA: Do we add the `git config` command that to ktd so devs won't need to do it?
I would think so -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39096 --- Comment #4 from Michał <schodkowy.omegi-0r@icloud.com> --- Yeah I think adding it to ktd would be a nice QoL benefit, I can't think of downsides. But I suggest trying to check if setting it as --global option would work, to avoid changing the configuration of the mounted repo. But even doing it on the level of git repo wouldn't be without advantages, since then the file would be recognized even if someone opens the repo in some IDE outside of ktd! So actually it might be better this way. The only other thing I'm thinking is that some more of old tidy commits could be added here (like a6c9bd0eb55c32d5632625144775271f20aa15f7?). But I'm not sure of a good way to find and identify large commits right now to reasonably find all/most of the past ones, so don't mind it much, could always be added later. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39096 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #178027|0 |1 is obsolete| | --- Comment #5 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 178128 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=178128&action=edit Bug 39096: Add 'tidy all' commits to a git blame ignore file To get a relevant blame we want to exclude some commits from bug 38664. Test plan: 0. Do not apply this patch 1. % git blame C4/Auth.pm (or other file) Notice that there is a lot of reference to bug 38664 (you can see it with the author "Koha Development Team") 2. Apply this patch 3. Tell git to use this new file: % git config blame.ignoreRevsFile .git-blame-ignore-revs Repeat 1. => There are way less refs to "Koha Development Team" Before: % git blame C4/Auth.pm|grep "Koha Development Team" | wc -l 454 After: % git blame C4/Auth.pm|grep "Koha Development Team" | wc -l 29 Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39096 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net --- Comment #6 from Victor Grousset/tuxayo <victor@tuxayo.net> --- (In reply to Jonathan Druart from comment #1)
QA: Do we add the `git config` command that to ktd so devs won't need to do it?
Yes. As far as I searched, there isn't a default blame.ignoreRevsFile that is picked up. So a `git config` command in KTD to enable it seems reasonable. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39096 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #7 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Tested on a vue file also. Works as expected. The remaining blame lines related to bug 38664 are those that are entirely new from bug 38664. Works, makes sense, QA script happy, code looks good, passing QA :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39096 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |25.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39096 --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 25.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39096 --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Looks like we are missing something here: t_Makefile_t.All directories should be mapped: .git-blame-ignore-revs -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39096 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |additional_work_needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39096 --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Katrin Fischer from comment #9)
Looks like we are missing something here: t_Makefile_t.All directories should be mapped: .git-blame-ignore-revs
Can someone confirm this is the right fix? - Add .git-blame-ignore-revs to MANIFEST.SKIP - Modify t/Make.t to exclude .git-blame-ignore-revs This would be about the same we do for .gitignore if I researched correctly. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39096 --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 178144 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=178144&action=edit Bug 39096: (follow-up) Fix failing t/Makefile.t test Ignore .git-blame-ignore-revs for Makefile.t, like we do for .gitignore. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39096 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Attachment #178144|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39096 --- Comment #12 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- (In reply to Katrin Fischer from comment #11)
Created attachment 178144 [details] [review] Bug 39096: (follow-up) Fix failing t/Makefile.t test
Ignore .git-blame-ignore-revs for Makefile.t, like we do for .gitignore.
This was not correct. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39096 --- Comment #13 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 178147 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=178147&action=edit Bug 39096: Add .git-blame-ignore-revs mapping to Makefile.PL Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39096 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |39149 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39149 [Bug 39149] .PL files not tidy -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39096 --- Comment #14 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Picking follow-up for main. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39096 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|additional_work_needed | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39096 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Status|Pushed to main |Needs documenting --- Comment #15 from Fridolin Somers <fridolin.somers@biblibre.com> --- Not for 24.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39096 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED CC| |david@davidnind.com Resolution|--- |FIXED --- Comment #16 from David Nind <david@davidnind.com> --- No changes to the manual required. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39096 Bug 39096 depends on bug 38664, which changed state. Bug 38664 Summary: Tidy the whole codebase https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38664 What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org