aboutsummaryrefslogtreecommitdiff
path: root/git_ref.go
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-02-18 10:23:44 +0800
committerRunxi Yu <me@runxiyu.org>2025-02-18 10:23:44 +0800
commitdd95e2dbfad7f39060dc70f145d0e1478770e454 (patch)
tree863f9c3a941f21a66fe0af1cbe9a09ae444c8a46 /git_ref.go
parentREADME.md: Mention that anonymous pushes to contrib/ are possible now (diff)
downloadforge-dd95e2dbfad7f39060dc70f145d0e1478770e454.tar.gz
forge-dd95e2dbfad7f39060dc70f145d0e1478770e454.tar.zst
forge-dd95e2dbfad7f39060dc70f145d0e1478770e454.zip
*.go: Add some comments for docs
Diffstat (limited to 'git_ref.go')
-rw-r--r--git_ref.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/git_ref.go b/git_ref.go
index 46f08e0..dbf9d7e 100644
--- a/git_ref.go
+++ b/git_ref.go
@@ -14,6 +14,8 @@ var (
err_getting_head = errors.New("Error getting HEAD")
)
+// get_ref_hash_from_type_and_name returns the hash of a reference given its
+// type and name as supplied in URL queries.
func get_ref_hash_from_type_and_name(repo *git.Repository, ref_type, ref_name string) (ref_hash plumbing.Hash, ret_err error) {
switch ref_type {
case "":