git-novelty

command module
v0.0.0-...-ff9e83a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 26, 2016 License: ISC Imports: 5 Imported by: 0

README

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"

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL