Skip to content

Commit

Permalink
build: use long hashes when generating feed.buildinfo
Browse files Browse the repository at this point in the history
Short hashes are not guaranteed to be unambiguous forever and could
collide if the repo grows over time. Git also estimates how many
characters are roughly required to prevent such a collision and slowly
increases the amount of characters beginning from 6, OpenWrt is already
at 8. Lets use the full hash the have a predictable length and keep
hashes unambiguous forever.

Signed-off-by: Sandro Jäckel <[email protected]>
  • Loading branch information
SuperSandro2000 authored and jow- committed Nov 2, 2023
1 parent 6f5f9a0 commit 376f1c8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/feeds
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ my %update_method = (
'update_force' => "git pull --ff-only || (git reset --hard HEAD; git pull --ff-only; exit 1)",
'post_update' => "git submodule update --init --recursive",
'controldir' => ".git",
'revision' => "git rev-parse --short HEAD | tr -d '\n'"},
'revision' => "git rev-parse HEAD | tr -d '\n'"},
'src-git-full' => {
'init' => "git clone '%s' '%s'",
'init_branch' => "git clone --branch '%s' '%s' '%s'",
Expand All @@ -171,12 +171,12 @@ my %update_method = (
'update_force' => "git pull --ff-only || (git reset --hard HEAD; git pull --ff-only; exit 1)",
'post_update' => "git submodule update --init --recursive",
'controldir' => ".git",
'revision' => "git rev-parse --short HEAD | tr -d '\n'"},
'revision' => "git rev-parse HEAD | tr -d '\n'"},
'src-gitsvn' => {
'init' => "git svn clone -r HEAD '%s' '%s'",
'update' => "git svn rebase",
'controldir' => ".git",
'revision' => "git rev-parse --short HEAD | tr -d '\n'"},
'revision' => "git rev-parse HEAD | tr -d '\n'"},
'src-bzr' => {
'init' => "bzr checkout --lightweight '%s' '%s'",
'update' => "bzr update",
Expand Down

0 comments on commit 376f1c8

Please sign in to comment.