Subject: bug#63596: guix-git-authenticate fails on fresh git clone

From: wolf <[email-masked]>
Date: Fri, 19 May 2023 23:41:59 +0200

Hello,

as instructed on the Building from Git documentation page, I am writing
regarding a failing test (guix-git-authenticate) on a fresh git clone of guix
repository.  I am unsure what the exact commit was (sorry!), but I'm pretty sure
it is not relevant in this case (assuming it was not fixed this week).

    $ cat tests/guix-git-authenticate.log
    + '[' -d /home/wolf/sources/guix/.git ]
    + guile -c '(use-modules (git))
      (member "refs/heads/keyring" (branch-list (repository-open ".")))'
    + intro_commit=9edb3f66fd807b096b48283debdcddccfea34bad
    + intro_signer='BBB0 2DDF 2CEA F6A8 0D1D  E643 A2A0 6DF2 A33A 54FA'
    + cache_key=test-3776
    + guix git authenticate 9edb3f66fd807b096b48283debdcddccfea34bad 'BBB0 2DDF 2CEA F6A8 0D1D  E643 A2A0 6DF2 A33A 54FA' '--cache-key=test-3776' --stats
    +'--end=9549f0283a78fe36f2d4ff2a04ef8ad6b0c02604'
    guix git: error: Git error: cannot locate remote-tracking branch 'keyring'
    + v1_2_0_commit=a099685659b4bfa6b3218f84953cbb7ff9e88063
    + guix git authenticate 9edb3f66fd807b096b48283debdcddccfea34bad 'BBB0 2DDF 2CEA F6A8 0D1D  E643 A2A0 6DF2 A33A 54FA' '--cache-key=test-3776' --stats
    +'--end=a099685659b4bfa6b3218f84953cbb7ff9e88063'
    guix git: error: Git error: cannot locate remote-tracking branch 'keyring'
    FAIL tests/guix-git-authenticate.sh (exit status: 1)

As you can see, it complains about branch `keyring' being missing.  Indeed, once
I created it:

    $ g co keyring
    branch 'keyring' set up to track 'origin/keyring'.
    Switched to a new branch 'keyring'

After this the test passed just fine.  I did not have time to look into it more
in depth nor produce a patch, so I thought I will at least report it, as
instructed by the documentation.

Have a nice day,
W.

-- 
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.