mirror of
https://github.com/go-gitea/git.git
synced 2026-07-25 12:46:00 -04:00
[PR #111] [MERGED] Simplify sha1 functions #115
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/go-gitea/git/pull/111
Author: @ethantkoenig
Created: 2/10/2018
Status: ✅ Merged
Merged: 2/10/2018
Merged by: @lafriks
Base:
master← Head:simplify/sha1📝 Commits (1)
06d9ca6Simplify sha1 functions📊 Changes
1 file changed (+5 additions, -24 deletions)
View changed files
📝
sha1.go(+5 -24)📄 Description
Some simplifications to prevent wheel re-invention:
hex.EncodeString(..)instead of manually hex encoding012..efeach call.copy(..)instead of manually copying bytescopyhas architecture-specialized implementationsbytes.Equal(..)instead of manually comparing bytesbytes.Equalhas architecture-specialized implementationsFor the record, converting an array to a slice (
arr[:]) does not copy the array.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.