Skip to content
This repository has been archived by the owner on Feb 1, 2022. It is now read-only.
/ git-novelty Public archive

Dumb utility to create cool Git commit hashes

License

Notifications You must be signed in to change notification settings

viking/git-novelty

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

git-novelty

This is a dumb Go binary to create cool Git commit hashes. Once installed, you can sort of use it in place of git commit.

Build Dependencies

  • go
  • latest libgit2 release
  • git2go (go get github.com/libgit2/git2go)

Syntax

git-novelty -m <message> (-p <prefix>|-r <repeat> -c <cycle>)

If git-novelty is in your shell path, you can use:

git novelty -m <message> (-p <prefix>|-r <repeat> -c <cycle>)

Modes

In prefix mode, git-novelty will try to create a commit with a hash that begins with your specified string. For example, git-novelty -m "foo" -p "0123456" might produce this hash: 01234569ba676004aa72a83ed2ce0f61ab663fc5.

In repeat mode, git-novelty will try to create a commit with a hash that has a repeating pattern for each cycle you specify. For example, git-novelty -m "foo" -r "0123" -c 10 might produce this hash: 0123bf19ba012304aa720123d2ce0f0123663fc5.

Caveats

This works by adding in salt to the commit message, kind of like how Bitcoin hashing works. Finding the desired hash can take a very long time, depending on the number of target bytes.

Example

mkdir foo
cd foo
git init
echo foo > foo
git add foo
git commit -m "Initial commit"
echo bar > bar
git add bar
git novelty -m "Added bar" -p "beef"

About

Dumb utility to create cool Git commit hashes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages