Bugzilla – Attachment 187977 Details for
Bug 39877
CI - Incremental runs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39877: Force commit id length to 10
Bug-39877-Force-commit-id-length-to-10.patch (text/plain), 1.73 KB, created by
Jonathan Druart
on 2025-10-16 09:07:36 UTC
(
hide
)
Description:
Bug 39877: Force commit id length to 10
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-10-16 09:07:36 UTC
Size:
1.73 KB
patch
obsolete
>From 69c8fdb6b9ab61e41440027c48becd9f742134a3 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 16 Oct 2025 11:04:58 +0200 >Subject: [PATCH] Bug 39877: Force commit id length to 10 > >The size of the commit id can vary, depending on the git repo. >For instance Jenkins had stored results using length of 9 (e9a07fe6a) >because it's a shallow clone. > >But 9 is not enough for our repo: >% git rev-list --all | sort | uniq -w 9 -D >29dfcf49f28bb8e75ab4b71a2d68f194928d3de9 >29dfcf49f68a2718c0d217921678cd1a0be38ab5 > >We need to force the length for both commands we use, so commits matched >during the comparison. >--- > Koha/Devel/CI/IncrementalRuns.pm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/Koha/Devel/CI/IncrementalRuns.pm b/Koha/Devel/CI/IncrementalRuns.pm >index d95dcb45ced..a62becddb9e 100644 >--- a/Koha/Devel/CI/IncrementalRuns.pm >+++ b/Koha/Devel/CI/IncrementalRuns.pm >@@ -129,7 +129,7 @@ sub get_files_to_test { > my $dev_files = Koha::Devel::Files->new( { context => $self->{context} } ); > my $no_history; > if ( $self->{incremental_run} ) { >- my @koha_commit_history = qx{git log --pretty=format:"%h"}; >+ my @koha_commit_history = qx{git log --abbrev=10 --pretty=format:"%h"}; > my @tested_commit_history = qx{ls $self->{git_repo_dir}/$self->{test_dir}}; > chomp for @koha_commit_history, @tested_commit_history; > if (@tested_commit_history) { >@@ -169,7 +169,7 @@ sub report_results { > > return unless $self->{report}; > >- my $commit_id = qx{git rev-parse --short HEAD}; >+ my $commit_id = qx{git rev-parse --short=10 HEAD}; > chomp $commit_id; > > my $failure_file = "$self->{git_repo_dir}/$self->{test_dir}/$commit_id"; >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 39877
:
182308
|
182309
|
182310
|
182311
|
182347
|
182348
|
182349
|
182350
|
182355
|
182356
|
182357
|
182358
|
183795
|
183796
|
183797
|
183798
|
184462
|
184463
|
184464
|
184465
|
184466
|
184779
|
184780
|
184781
|
184782
|
184783
|
184785
|
184875
|
184876
|
184877
|
184878
|
184879
|
184880
|
186320
|
186321
|
186322
|
186323
|
186324
|
186325
|
186327
|
186328
|
186329
|
186330
|
186331
|
186332
|
186362
|
186363
|
186364
|
186365
|
186366
|
186367
|
186368
|
186370
|
186622
|
187387
|
187388
|
187389
|
187390
|
187391
|
187392
|
187393
|
187394
|
187395
|
187399
|
187400
|
187401
|
187402
|
187403
|
187404
|
187405
|
187406
|
187407
|
187744
| 187977