diff options
author | Christopher Baines <mail@cbaines.net> | 2023-10-13 14:56:39 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2023-10-13 14:56:39 +0100 |
commit | 00808356f65a4bc40aaa66d335a71f6fca9c1f7d (patch) | |
tree | 3927674c6e9249514de5d7a7ddcda408a975fc7b | |
parent | a35051ccbd8497be9fa5174a1d21825140792182 (diff) | |
download | qa-frontpage-00808356f65a4bc40aaa66d335a71f6fca9c1f7d.tar qa-frontpage-00808356f65a4bc40aaa66d335a71f6fca9c1f7d.tar.gz |
Fix an issue with applying patches
The base commit hash was being fetched before it had been created.
-rw-r--r-- | guix-qa-frontpage/manage-patch-branches.scm | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/guix-qa-frontpage/manage-patch-branches.scm b/guix-qa-frontpage/manage-patch-branches.scm index 88601b4..61984ca 100644 --- a/guix-qa-frontpage/manage-patch-branches.scm +++ b/guix-qa-frontpage/manage-patch-branches.scm @@ -12,6 +12,8 @@ #:use-module (web client) #:use-module (json) #:use-module (prometheus) + #:use-module (git) + #:use-module (guix git) #:use-module (guix sets) #:use-module (guix memoization) #:use-module (guix build utils) @@ -132,7 +134,7 @@ (define base-tag (string-append "base-for-" branch-name)) - (define base-commit-hash + (define (base-commit-hash) (invoke-read-line "git" "show-ref" "--hash" base-tag)) (define (create-base-tag) @@ -192,8 +194,10 @@ (begin (insert-log results) - (if (string=? base-commit-hash - (invoke-read-line "git" "rev-parse" "HEAD")) + (if (string=? (base-commit-hash) + (with-repository (getcwd) repository + (oid->string + (reference-name->oid repository "HEAD")))) (simple-format (current-error-port) "Commit hashes match, so no patches have been applied\n") |