[PR #15] [CLOSED] Increase length of short ref #20

Open
opened 2026-01-24 11:41:39 +01:00 by admin · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/php/web-rmtools/pull/15
Author: @shivammathur
Created: 11/7/2020
Status: Closed

Base: masterHead: shivammathur-ref-length


📝 Commits (1)

  • ceaefd7 Increase length of short ref

📊 Changes

2 files changed (+2 additions, -2 deletions)

View changed files

📝 include/Branch.php (+1 -1)
📝 script/snap.php (+1 -1)

📄 Description

Latest commit on master branch of php-src is inaccessible using short commit hash of 7 characters, so the zip file fails to download.
For hash 6768f4705cf0603d4770e3825795ec6b30bbb8c1, these URLs would 404.

https://github.com/php/php-src/commit/6768f47
https://codeload.github.com/php/php-src/zip/6768f47

This results in this error, as the zip fails to download

Fatal error: Uncaught Exception: Failed to rename 'C:/php-snap-build/obj-x64\ts-windows-vs16-x64-6768f47-tmp-unzip/php-src-6768f47' to 'C:/php-snap-build/obj-x64/master-src-ts-windows-vs16-x64-r6768f47' in C:\php-snap-build\rmtools\include\Branch.php:276

Increasing the length to 10 characters would be a good fix as git log --oneline currently on php-src uses 10 characters for shortening commit hashes.

$ git log --oneline
6768f4705c (HEAD -> master, up/master, 6768f47) Merge branch 'PHP-8.0'
49ca191667 (up/PHP-8.0, PHP-8.0) Merge branch 'PHP-7.4' into PHP-8.0
77b6e95d92 (up/PHP-7.4) Split tests for compatibility with ICU 68.1
...
...

Relevant discussion: https://stackoverflow.com/questions/18134627


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/php/web-rmtools/pull/15 **Author:** [@shivammathur](https://github.com/shivammathur) **Created:** 11/7/2020 **Status:** ❌ Closed **Base:** `master` ← **Head:** `shivammathur-ref-length` --- ### 📝 Commits (1) - [`ceaefd7`](https://github.com/php/web-rmtools/commit/ceaefd7805b74b6bd5c1f72cb5bf00367e436476) Increase length of short ref ### 📊 Changes **2 files changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `include/Branch.php` (+1 -1) 📝 `script/snap.php` (+1 -1) </details> ### 📄 Description Latest commit on `master` branch of `php-src` is inaccessible using short commit hash of 7 characters, so the zip file fails to download. For hash `6768f4705cf0603d4770e3825795ec6b30bbb8c1`, these URLs would `404`. ``` https://github.com/php/php-src/commit/6768f47 https://codeload.github.com/php/php-src/zip/6768f47 ``` This results in this [error](https://github.com/shivammathur/php-builder-windows/runs/1366632460?check_suite_focus=true#step:9:20), as the zip fails to download ``` Fatal error: Uncaught Exception: Failed to rename 'C:/php-snap-build/obj-x64\ts-windows-vs16-x64-6768f47-tmp-unzip/php-src-6768f47' to 'C:/php-snap-build/obj-x64/master-src-ts-windows-vs16-x64-r6768f47' in C:\php-snap-build\rmtools\include\Branch.php:276 ``` Increasing the length to 10 characters would be a good fix as `git log --oneline` currently on `php-src` uses 10 characters for shortening commit hashes. ``` $ git log --oneline 6768f4705c (HEAD -> master, up/master, 6768f47) Merge branch 'PHP-8.0' 49ca191667 (up/PHP-8.0, PHP-8.0) Merge branch 'PHP-7.4' into PHP-8.0 77b6e95d92 (up/PHP-7.4) Split tests for compatibility with ICU 68.1 ... ... ``` **Relevant discussion:** https://stackoverflow.com/questions/18134627 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
admin added the pull-request label 2026-01-24 11:41:39 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: php/web-rmtools#20