Bug 40261

Summary: Tidy `build-git-snapshot`
Product: Koha Reporter: Tomás Cohen Arazi (tcohen) <tomascohen>
Component: Architecture, internals, and plumbingAssignee: Tomás Cohen Arazi (tcohen) <tomascohen>
Status: Signed Off --- QA Contact: Martin Renvoize (ashimema) <martin.renvoize>
Severity: normal    
Priority: P5 - low CC: flaterdavid, jonathan.druart, lucas, tomascohen
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 38664, 40039    
Bug Blocks: 39876    
Attachments: Bug 40261: Teach tidy.pl how to handle build-git-snapshot
Bug 40261: Teach tidy.pl how to handle build-git-snapshot
Bug 40261: Tidy debian/build-git-snapshot
Bug 40261: Tidy debian/build-git-snapshot
Bug 40261: Teach tidy.pl how to handle build-git-snapshot
Bug 40261: Tidy debian/build-git-snapshot

Description Tomás Cohen Arazi (tcohen) 2025-06-27 13:58:14 UTC
It needs to be considered a Perl script.
Comment 1 Tomás Cohen Arazi (tcohen) 2025-06-27 14:10:05 UTC
Created attachment 183608 [details] [review]
Bug 40261: Teach tidy.pl how to handle build-git-snapshot

This patch makes the `tidy.pl` script handle the mentioned script as a Perl script.

To test:
1. Run:
   $ ktd --shell
  k$ perl misc/devel/tidy.pl debian/build-git-snapshot
=> FAIL: You get:

```
Cannot guess filetype for debian/build-git-snapshot at misc/devel/tidy.pl line 234.
```

2. Apply this patch
3. Repeat 1
=> SUCCESS: It tidies the file!
4. Reset to the current head
  k$ git reset --hard HEAD
5. Apply the tidy patch
6. Repeat 1
7. Run:
  k$ git diff
=> SUCCESS: No diff, the file is tidy
8. Sign off :-D
Comment 2 Tomás Cohen Arazi (tcohen) 2025-06-27 14:13:52 UTC
Created attachment 183610 [details] [review]
Bug 40261: Teach tidy.pl how to handle build-git-snapshot

This patch makes the `tidy.pl` script handle the mentioned script as a Perl script.

To test:
1. Run:
   $ ktd --shell
  k$ perl misc/devel/tidy.pl debian/build-git-snapshot
=> FAIL: You get:

```
Cannot guess filetype for debian/build-git-snapshot at misc/devel/tidy.pl line 234.
```

2. Apply this patch
3. Repeat 1
=> SUCCESS: It tidies the file!
4. Reset to the current head
  k$ git reset --hard HEAD
5. Apply the tidy patch
6. Repeat 1
7. Run:
  k$ git diff
=> SUCCESS: No diff, the file is tidy
8. Sign off :-D
Comment 3 Tomás Cohen Arazi (tcohen) 2025-06-27 14:13:55 UTC
Created attachment 183611 [details] [review]
Bug 40261: Tidy debian/build-git-snapshot
Comment 4 David Flater 2025-06-27 14:33:01 UTC
Created attachment 183612 [details] [review]
Bug 40261: Tidy debian/build-git-snapshot

Signed-off-by: David Flater <flaterdavid@gmail.com>
Comment 5 David Flater 2025-06-27 14:47:51 UTC
Created attachment 183613 [details] [review]
Bug 40261: Teach tidy.pl how to handle build-git-snapshot

This patch makes the `tidy.pl` script handle the mentioned script as a Perl script.

To test:
1. Run:
   $ ktd --shell
  k$ perl misc/devel/tidy.pl debian/build-git-snapshot
=> FAIL: You get:

```
Cannot guess filetype for debian/build-git-snapshot at misc/devel/tidy.pl line 234.
```

2. Apply this patch
3. Repeat 1
=> SUCCESS: It tidies the file!
4. Reset to the current head
  k$ git reset --hard HEAD
5. Apply the tidy patch
6. Repeat 1
7. Run:
  k$ git diff
=> SUCCESS: No diff, the file is tidy
8. Sign off :-D
Comment 6 David Flater 2025-06-27 14:47:53 UTC
Created attachment 183614 [details] [review]
Bug 40261: Tidy debian/build-git-snapshot

Signed-off-by: David Flater <flaterdavid@gmail.com>
Comment 7 Jonathan Druart 2025-06-27 15:20:29 UTC
Will conflict with bug 39876...
Comment 8 Tomás Cohen Arazi (tcohen) 2025-06-27 17:45:21 UTC
(In reply to Jonathan Druart from comment #7)
> Will conflict with bug 39876...

Moved my change to that bug. And PQA it :-D
Comment 9 Tomás Cohen Arazi (tcohen) 2025-06-27 17:56:25 UTC
I moved the logic change into 39876. Keeping the tidy here.