"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Christian Weisgerber <naddy@mips.inka.de>
Subject:
Bookmarking a commit?
To:
gameoftrees@openbsd.org
Date:
Mon, 14 Aug 2023 16:51:15 +0200

Download raw body.

Thread
  • Christian Weisgerber:

    Bookmarking a commit?

What's the suggested way to "bookmark" a commit, so I can refer to it
symbolically?  In Git terms, a lightweight tag?

Got tag only supports annotated tags.

Obviously I want to use "ref" to create a reference.  But in which
namespace?  ref/tags/?

While I'm here... The man page says:
  When creating, deleting, or changing a reference the specified
  name must be an absolute reference name, i.e. it must begin with
  "refs/".

That's not true for creation:

$ got ref -c 1fa342e146 tags/test
$ got ref -l | grep test
refs/tags/test: 1fa342e146980bc77bb33395ec4479ec0476a41c
$ got ref -d tags/test            
got: reference tags/test not found
$ got ref -d refs/tags/test
Deleted refs/tags/test: 1fa342e146980bc77bb33395ec4479ec0476a41c

Actually, it's not quite true for deletion either:

$ got ref -c 270e791 tags/good-ssh
$ got ref -l | fgrep good-ssh
refs/tags/good-ssh: 270e7910b4a1ddab7cd96da8494e4279dc41aaff
$ got ref -d good-ssh         
Deleted refs/tags/good-ssh: 270e7910b4a1ddab7cd96da8494e4279dc41aaff

-- 
Christian "naddy" Weisgerber                          naddy@mips.inka.de