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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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